Compare commits

...

17 Commits

Author SHA1 Message Date
Dianne Skoll
6e1dc7dcd7 Don't SET any variables in holiday files.
All checks were successful
Remind unit tests / tests (push) Successful in 31s
2024-11-03 13:19:11 -05:00
Dianne Skoll
bf193250cc Don't SET any variables in a holiday file. 2024-11-03 13:18:16 -05:00
Dianne Skoll
2c5eeb02f6 Merge branch 'holidays_de' into 'master'
Add German holidays

See merge request dskoll/remind!6
2024-11-03 17:54:47 +00:00
Jochen Sprickerhof
5cd343c27c Add German holidays 2024-11-03 18:42:08 +01:00
Dianne Skoll
81b48b70c4 Change include policy so regional files do not include the country file. 2024-11-03 11:28:31 -05:00
Dianne Skoll
5e738020a7 Make a note about include ca.rem directly
All checks were successful
Remind unit tests / tests (push) Successful in 32s
2024-11-02 18:03:18 -04:00
Dianne Skoll
7949341037 Split Canadian holidays by province. 2024-11-02 16:59:20 -04:00
Dianne Skoll
f4d8331456 Clarify invocation commandlines.
All checks were successful
Remind unit tests / tests (push) Successful in 30s
2024-11-02 10:45:05 -04:00
Dianne Skoll
17beef5ce6 Use a much shorter static size for dynamic buffers.
All checks were successful
Remind unit tests / tests (push) Successful in 32s
Most strings are pretty short.
2024-11-01 16:40:44 -04:00
Dianne Skoll
aaae80d02b Update manual to reflect that iif() and choose() only evaluate arguments needed for the final result.
All checks were successful
Remind unit tests / tests (push) Successful in 25s
2024-10-21 23:35:41 -04:00
Dianne Skoll
e97de16203 Clarify that arg of OMITFUNC must be a user-defined function.
All checks were successful
Remind unit tests / tests (push) Successful in 27s
2024-10-21 08:58:36 -04:00
Dianne Skoll
d5e38ee3b4 Fix typo in test.rem.
All checks were successful
Remind unit tests / tests (push) Successful in 28s
2024-10-18 11:26:41 -04:00
Dianne Skoll
11594aee2d Rename configure.in to configure.ac to avoid autoreconf warning. 2024-10-18 11:21:41 -04:00
Dianne Skoll
711f0b6c69 Rename contrib/ical2rem-0.7.1 to contrib/ical2rem-0.8
All checks were successful
Remind unit tests / tests (push) Successful in 29s
2024-10-17 15:29:15 -04:00
Dianne Skoll
87a8b9811d Update to upstream 0.8. 2024-10-17 15:28:42 -04:00
Dianne Skoll
689b1d0e13 Rebuild src/config.h.in with autoreconf
All checks were successful
Remind unit tests / tests (push) Successful in 30s
2024-10-17 13:19:53 -04:00
Dianne Skoll
a8650e888f Add comment to AC_DEFINE_UNQUOTED 2024-10-17 13:17:44 -04:00
35 changed files with 570 additions and 183 deletions

1
configure vendored
View File

@@ -4201,6 +4201,7 @@ fi
VERSION=$PACKAGE_VERSION
CONFIG_CMD="$0$ac_configure_args_raw"
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
printf "%s\n" "#define CONFIG_CMD \"$CONFIG_CMD\"" >>confdefs.h

View File

@@ -89,7 +89,7 @@ AC_CHECK_FUNCS(strdup strcasecmp strncasecmp setenv unsetenv glob mbstowcs setlo
VERSION=$PACKAGE_VERSION
CONFIG_CMD="$0$ac_configure_args_raw"
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
AC_DEFINE_UNQUOTED([CONFIG_CMD], ["$CONFIG_CMD"])
AC_DEFINE_UNQUOTED([CONFIG_CMD], ["$CONFIG_CMD"], [Configuration command used to build Remind])
AC_SUBST(CONFIG_CMD)
AC_SUBST(VERSION)
AC_SUBST(PERL)

View File

@@ -25,6 +25,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# version 0.8 2024-10-16
# - Issue 9. Remove extra day notation on all day events.
# version 0.7.1 2024-09-19
# - Made sure license statements were consistent
# version 0.7 2024-09-04
@@ -32,34 +34,34 @@
# version 0.6 2019-03-01
# - Updates to put on GitHub
# version 0.5.2 2007-03-23
# - BUG: leadtime for recurring events had a max of 4 instead of DEFAULT_LEAD_TIME
# - remove project-lead-time, since Category was a non-standard attribute
# - NOTE: There is a bug in iCal::Parser v1.14 that causes multiple calendars to
# fail if a calendar with recurring events is followed by a calendar with no
# recurring events. This has been reported to the iCal::Parser author.
# - BUG: leadtime for recurring events had a max of 4 instead of DEFAULT_LEAD_TIME
# - remove project-lead-time, since Category was a non-standard attribute
# - NOTE: There is a bug in iCal::Parser v1.14 that causes multiple calendars to
# fail if a calendar with recurring events is followed by a calendar with no
# recurring events. This has been reported to the iCal::Parser author.
# version 0.5.1 2007-03-21
# - BUG: Handle multiple calendars on STDIN
# - add --heading option for priority on section headers
# - BUG: Handle multiple calendars on STDIN
# - add --heading option for priority on section headers
# version 0.5 2007-03-21
# - Add more help options
# - --project-lead-time option
# - Supress printing of heading if there are no todos to print
# - Add more help options
# - --project-lead-time option
# - Supress printing of heading if there are no todos to print
# version 0.4
# - Version 0.4 changes all written or inspired by, and thanks to Mark Stosberg
# - Change to GetOptions
# - Change to pipe
# - Add --label, --help options
# - Add Help Text
# - Change to subroutines
# - Efficiency and Cleanup
# - Version 0.4 changes all written or inspired by, and thanks to Mark Stosberg
# - Change to GetOptions
# - Change to pipe
# - Add --label, --help options
# - Add Help Text
# - Change to subroutines
# - Efficiency and Cleanup
# version 0.3
# - Convert to GPL (Thanks to Mark Stosberg)
# - Add usage
# - Convert to GPL (Thanks to Mark Stosberg)
# - Add usage
# version 0.2
# - add command line switches
# - add debug code
# - add SCHED _sfun keyword
# - fix typos
# - add command line switches
# - add debug code
# - add SCHED _sfun keyword
# - fix typos
# version 0.1 - ALPHA CODE.
=head1 SYNOPSIS
@@ -67,19 +69,19 @@
cat /path/to/file*.ics | ical2rem.pl > ~/.ical2rem
All options have reasonable defaults:
--label Calendar name (Default: Calendar)
--label Calendar name (Default: Calendar)
--start Start of time period to parse (parsed by str2time)
--end End of time period to parse
--lead-time Advance days to start reminders (Default: 3)
--lead-time Advance days to start reminders (Default: 3)
--todos, --no-todos Process Todos? (Default: Yes)
--iso8601 Use YYYY-MM-DD date format
--iso8601 Use YYYY-MM-DD date format
--locations, --no-locations Include location? (Default: Yes)
--end-times, --no-end-times Include event end times in reminder text
(Default: No)
--heading Define a priority for static entries
--help Usage
--debug Enable debug output
--man Complete man page
--help Usage
--debug Enable debug output
--man Complete man page
Expects an ICAL stream on STDIN. Converts it to the format
used by the C<remind> script and prints it to STDOUT.
@@ -147,18 +149,18 @@ my $end;
my $label = 'Calendar';
GetOptions (
"label=s" => \$label,
"start=s" => \$start,
"end=s" => \$end,
"lead-time=i" => \$DEFAULT_LEAD_TIME,
"todos!" => \$PROCESS_TODOS,
"iso8601!" => \$iso8601,
"locations!" => \$do_location,
"end-times!" => \$do_end_times,
"heading=s" => \$HEADING,
"help|?" => \$help,
"debug" => \$debug,
"man" => \$man
"label=s" => \$label,
"start=s" => \$start,
"end=s" => \$end,
"lead-time=i" => \$DEFAULT_LEAD_TIME,
"todos!" => \$PROCESS_TODOS,
"iso8601!" => \$iso8601,
"locations!" => \$do_location,
"end-times!" => \$do_end_times,
"heading=s" => \$HEADING,
"help|?" => \$help,
"debug" => \$debug,
"man" => \$man
) or pod2usage(1);
pod2usage(1) if $help;
pod2usage(-verbose => 2) if $man;
@@ -169,11 +171,11 @@ my @calendars;
my $in;
while (<>) {
$in .= $_;
if (/END:VCALENDAR/) {
push(@calendars,$in);
$in = "";
}
$in .= $_;
if (/END:VCALENDAR/) {
push(@calendars,$in);
$in = "";
}
}
print STDERR "Read all calendars\n" if $debug;
my(%parser_opts) = ("debug" => $debug);
@@ -202,57 +204,57 @@ print STDERR "Calendars parsed\n" if $debug;
# expects 'todos' hashref from iCal::Parser is input
# returns String to output
sub _process_todos {
my $todos = shift;
my ($todo, @newtodos, $leadtime);
my $output = "";
my $todos = shift;
my ($todo, @newtodos, $leadtime);
my $output = "";
$output .= 'REM '.$HEADING.' MSG '.$label.' ToDos:%"%"%'."\n";
$output .= 'REM '.$HEADING.' MSG '.$label.' ToDos:%"%"%'."\n";
# For sorting, make sure everything's got something
# To sort on.
my $now = DateTime->now;
for $todo (@{$todos}) {
# remove completed items
if ($todo->{'STATUS'} && $todo->{'STATUS'} eq 'COMPLETED') {
next;
} elsif ($todo->{'DUE'}) {
# All we need is a due date, everything else is sugar
$todo->{'SORT'} = $todo->{'DUE'}->clone;
} elsif ($todo->{'DTSTART'}) {
# for sorting, sort on start date if there's no due date
$todo->{'SORT'} = $todo->{'DTSTART'}->clone;
} else {
# if there's no due or start date, just make it now.
$todo->{'SORT'} = $now;
}
push(@newtodos,$todo);
}
if (! (scalar @newtodos)) {
return "";
}
my $now = DateTime->now;
for $todo (@{$todos}) {
# remove completed items
if ($todo->{'STATUS'} && $todo->{'STATUS'} eq 'COMPLETED') {
next;
} elsif ($todo->{'DUE'}) {
# All we need is a due date, everything else is sugar
$todo->{'SORT'} = $todo->{'DUE'}->clone;
} elsif ($todo->{'DTSTART'}) {
# for sorting, sort on start date if there's no due date
$todo->{'SORT'} = $todo->{'DTSTART'}->clone;
} else {
# if there's no due or start date, just make it now.
$todo->{'SORT'} = $now;
}
push(@newtodos,$todo);
}
if (! (scalar @newtodos)) {
return "";
}
# Now sort on the new Due dates and print them out.
for $todo (sort { DateTime->compare($a->{'SORT'}, $b->{'SORT'}) } @newtodos) {
my $due = $todo->{'SORT'}->clone();
my $priority = "";
if (defined($todo->{'PRIORITY'})) {
if ($todo->{'PRIORITY'} == 1) {
$priority = "PRIORITY 1000";
} elsif ($todo->{'PRIORITY'} == 3) {
$priority = "PRIORITY 7500";
}
}
if (defined($todo->{'DTSTART'}) && defined($todo->{'DUE'})) {
# Lead time is duration of task + lead time
my $diff = ($todo->{'DUE'}->delta_days($todo->{'DTSTART'})->days())+$DEFAULT_LEAD_TIME;
$leadtime = "+".$diff;
} else {
$leadtime = "+".$DEFAULT_LEAD_TIME;
}
$output .= "REM ".$due->month_abbr." ".$due->day." ".$due->year." $leadtime $priority MSG \%a $todo->{'SUMMARY'}\%\"\%\"\%\n";
}
$output .= 'REM '.$HEADING.' MSG %"%"%'."\n";
return $output;
for $todo (sort { DateTime->compare($a->{'SORT'}, $b->{'SORT'}) } @newtodos) {
my $due = $todo->{'SORT'}->clone();
my $priority = "";
if (defined($todo->{'PRIORITY'})) {
if ($todo->{'PRIORITY'} == 1) {
$priority = "PRIORITY 1000";
} elsif ($todo->{'PRIORITY'} == 3) {
$priority = "PRIORITY 7500";
}
}
if (defined($todo->{'DTSTART'}) && defined($todo->{'DUE'})) {
# Lead time is duration of task + lead time
my $diff = ($todo->{'DUE'}->delta_days($todo->{'DTSTART'})->days())+$DEFAULT_LEAD_TIME;
$leadtime = "+".$diff;
} else {
$leadtime = "+".$DEFAULT_LEAD_TIME;
}
$output .= "REM ".$due->month_abbr." ".$due->day." ".$due->year." $leadtime $priority MSG \%a $todo->{'SUMMARY'}\%\"\%\"\%\n";
}
$output .= 'REM '.$HEADING.' MSG %"%"%'."\n";
return $output;
}
@@ -284,7 +286,7 @@ foreach $yearkey (sort keys %{$events} ) {
DateTime->compare($dayevents->{$a}->{'DTSTART'}, $dayevents->{$b}->{'DTSTART'})
} keys %{$dayevents}) {
my $event = $dayevents->{$uid};
if ($eventsbyuid{$uid}) {
if ($eventsbyuid{$uid}) {
my $curreventday = $event->{'DTSTART'}->clone;
$curreventday->truncate( to => 'day' );
$eventsbyuid{$uid}{$curreventday->epoch()} =1;
@@ -293,13 +295,17 @@ foreach $yearkey (sort keys %{$events} ) {
$event->{'LEADTIME'} = $i;
}
}
# Issue 9. Multi-day events have extra day with zero time. Mark this as the date not needed in reminders file so we can skip later
# Repeating multi-day events have the same uid so we need to mark each one.
if ($event->{'DTSTART'} eq $event->{'DTEND'} and $event->{'DTEND'}->hour eq 0 and $event->{'DTEND'}->minute eq 0 and $event->{'DTEND'}->second eq 0) {
$eventsbyuid{$uid}{$event->{'DTSTART'}->ymd} = 'rm';
}
} else {
$eventsbyuid{$uid} = $event;
my $curreventday = $event->{'DTSTART'}->clone;
$curreventday->truncate( to => 'day' );
$eventsbyuid{$uid}{$curreventday->epoch()} =1;
}
}
}
}
@@ -322,6 +328,10 @@ foreach $yearkey (sort keys %{$events} ) {
my $start = $event->{'DTSTART'};
my $end = $event->{'DTEND'};
my $duration = "";
# Issue 9. All Day events create an event that has zero length and DTSTART and DTEND at 00:00 on last day. Marked while handling multi-day events. Ignore these
if ($start eq $end and $eventsbyuid{$uid}{$start->ymd} and $eventsbyuid{$uid}{$start->ymd} eq 'rm') {
next;
}
if ($end and ($start->hour or $start->minute or $end->hour or $end->minute)) {
# We need both an HH:MM version of the delta, to put in the
# DURATION specifier, and a human-readable version of the
@@ -383,4 +393,4 @@ sub quote {
}
exit 0;
#:vim set ft=perl ts=4 sts=4 expandtab :
#:vim set ft=perl ts=4 sts=4 tabstop=4 expandtab :

View File

@@ -1,32 +1,16 @@
# Canadian holidays
# Canadian Federal Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file ONLY includes Federal holidays that are observed throughout
# Canada. You should also include the appropriate file for the province
# or territory where you live to get all of the statutory holidays for
# that province. For example, if you live in Ontario, use:
#
# INCLUDE [$SysInclude]/ca.rem
# INCLUDE [$SysInclude]/ca/on.rem
OMIT 1 Jan MSG New Year's Day
# This varies by province
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
# This varies by province
OMIT [easterdate($Uy) - 2] MSG Good Friday
# This varies by province
OMIT [easterdate($Uy) + 1] MSG Easter Monday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
OMIT 1 July MSG Canada Day
# This varies by province
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
REM First Monday in Sep SCANFROM -7 ADDOMIT MSG Labour Day
REM 30 Sep MSG National Day for Truth and Reconciliation
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
REM 11 November MSG Remembrance Day
OMIT 25 Dec MSG Christmas
OMIT 26 Dec MSG Boxing Day

View File

@@ -0,0 +1,12 @@
# Alberta Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Alberta.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,12 @@
# British Columbia Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for British Columbia.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,11 @@
# Manitoba Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Manitoba.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Louis Riel Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,10 @@
# New Brunswick Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for New Brunswick.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,11 @@
# Newfoundland and Labrador Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Newfoundland and Labrador.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT 17 March MSG St. Patrick's Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
OMIT 23 April MSG St. George's Day
OMIT 24 June MSG Discovery Day
REM 11 November MSG Remembrance Day

View File

@@ -0,0 +1,10 @@
# Nova Scotia Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Nova Scotia.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Heritage Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM 11 November MSG Remembrance Day

View File

@@ -0,0 +1,11 @@
# Northwest Territories Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for the Northwest Territories.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
OMIT 21 June MSG National Aboriginal Day
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,11 @@
# Nunavut Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Nunavut.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
OMIT 9 July MSG Nunavut Day
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,12 @@
# Ontario Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Ontario.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
REM 11 November MSG Remembrance Day
OMIT 26 Dec MSG Boxing Day

View File

@@ -0,0 +1,10 @@
# Prince Edward Island Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Prince Edward Island.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Islander Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,11 @@
# Quebec Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Quebec.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) + 1] MSG Easter Monday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
OMIT 24 June MSG Fête Nationale
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
REM 11 November MSG Remembrance Day

View File

@@ -0,0 +1,12 @@
# Saskatchewan Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Saskatchewan.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

View File

@@ -0,0 +1,12 @@
# Yukon Territory Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file includes holidays only for Yukon Territory.
# To get Federal holidays as well, INCLUDE [$SysInclude]/ca.rem
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Discovery Day
OMIT [easterdate($Uy) - 2] MSG Good Friday
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
OMIT June 21 MSG National Indigenous Peoples Day
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
OMIT 11 November MSG Remembrance Day

20
include/holidays/de.rem Normal file
View File

@@ -0,0 +1,20 @@
# German Federal Holidays
# SPDX-License-Identifier: GPL-2.0-only
# NOTE: This file ONLY includes Federal holidays that are observed throughout Germany.
# You should also include the appropriate file for the state where you live
# to get all of the statutory holidays.
# For example, if you live in Lower Saxony, use:
#
# INCLUDE [$SysInclude]/de.rem
# INCLUDE [$SysInclude]/de/ni.rem
OMIT Jan 1 MSG Neujahr
OMIT [easterdate($Uy)-2] MSG Karfreitag
OMIT [easterdate($Uy)+1] MSG Ostermontag
OMIT May 1 MSG Tag der Arbeit
OMIT [easterdate($Uy)+39] MSG Christi Himmelfahrt
OMIT [easterdate($Uy)+50] MSG Pfingstmontag
OMIT Oct 3 MSG Tag der deutschen Einheit
OMIT Dec 25 MSG 1. Weihnachtsfeiertag
OMIT Dec 26 MSG 2. Weihnachtsfeiertag

View File

@@ -0,0 +1,7 @@
# Bavarian Holidays
# SPDX-License-Identifier: GPL-2.0-only
OMIT Jan 6 MSG Heilige Drei Könige
OMIT [easterdate($Uy)+60] MSG Fronleichnam
OMIT Aug 15 MSG Mariä Himmelfahrt
OMIT Nov 1 MSG Allerheiligen (regional)

View File

@@ -0,0 +1,4 @@
# Lower Saxony Holidays
# SPDX-License-Identifier: GPL-2.0-only
OMIT Oct 31 MSG Tag Reformationstag

View File

@@ -5,14 +5,12 @@
# https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006072050/LEGISCTA000006178007/2016-08-10/
#
SET easter EASTERDATE($Uy)
REM Jan 1 MSG %"Jour de l'an%"
REM [easter+1] MSG %"Lundi de Pâques%"
REM [easterdate($Uy)+1] MSG %"Lundi de Pâques%"
REM May 1 MSG %"Fête du Travail%"
REM May 8 MSG %"Victoire des alliés%"
REM [easter+39] MSG %"Jeudi de l'Ascension%"
REM [easter+50] MSG %"Lundi de Pentecôte%"
REM [easterdate($Uy)+39] MSG %"Jeudi de l'Ascension%"
REM [easterdate($Uy)+50] MSG %"Lundi de Pentecôte%"
REM Jul 14 MSG %"Fête nationale%"
REM Aug 15 MSG %"Assomption%"
REM Nov 1 MSG %"La Toussaint%"

View File

@@ -31,10 +31,9 @@ REM Monday 1 August SCANFROM -7 ADDOMIT MSG August Public Holiday
REM Monday 1 -7 November SCANFROM -7 ADDOMIT MSG October Public Holiday
; Easter
SET easter easterdate(today())
REM [TRIGGER(easter-2)] MSG Good Friday (Aoine an Chéasta)
REM [TRIGGER(easter)] MSG Easter Sunday (Domhnach Cásca)
OMIT [TRIGGER(easter+1)] MSG Easter Monday (Luan Cásca) Public Holiday
REM [easterdate($Uy)-2] MSG Good Friday (Aoine an Chéasta)
REM [easterdate($Uy)] MSG Easter Sunday (Domhnach Cásca)
OMIT [easterdate($Uy)+1] MSG Easter Monday (Luan Cásca) Public Holiday
; St. Brigid's Day
REM 1 February MSG Saint Brigid's Day (Lá Fhéile Bríde or Imbolc)

View File

@@ -1139,6 +1139,10 @@ be Friday, Saturday and Sunday.
.PP
The \fBOMITFUNC\fR phrase of the \fBREM\fR command allows you to
supply a function that determines whether or not a date is omitted.
Note that \fBOMITFUNC\fR must be given just the name of a user-defined
function; it can't take an arbitrary expression or the name of a built-in
function.
.PP
The function is passed a single parameter of type \fBDATE\fR, and must
return a non-zero integer if the date is considered "omitted" and 0
otherwise. Here's an example:
@@ -3097,8 +3101,9 @@ arguments, then the last argument is returned. Examples:
\fBchoose(4, "foo", 1:13, 1000)\fR returns 1000
.fi
.RS
Note that all arguments to \fBchoose()\fR are \fIalways\fR
evaluated.
.PP
Note that only the first argument and the chosen result are
evaluated. Any non-chosen arguments will not be evaluated.
.RE
.TP
.B coerce(s_type, x_arg)
@@ -3357,8 +3362,9 @@ when it encounters a ">".
.B iif(x_test1, x_arg1, [x_test2, x_arg2,...], x_default)
If \fItest1\fR is true, returns \fIarg1\fR. Otherwise, if \fItest2\fR
is true, returns \fIarg2\fR, and so on. If all of the \fItest\fR
arguments are false, returns \fIdefault\fR. Note that all arguments
are \fIalways\fR evaluated. This function accepts an odd number of
arguments are false, returns \fIdefault\fR. Note that only
those arguments needed to determine the final result are
evaluated. This function accepts an odd number of
arguments - note that prior to version 03.00.05 of \fBRemind\fR, it
accepted 3 arguments only. The 3-argument version of \fBiif()\fR is
compatible with previous versions of \fBRemind\fR.

View File

@@ -26,12 +26,12 @@ rem2html - Convert the output of "remind -pp" to HTML
=head1 SYNOPSIS
remind -pp ... | rem2html [options]
remind -pp [remind_options] file | rem2html [options]
You can also use the old interchange format as below, but the -pp
version is preferred.
remind -p ... | rem2html [options]
remind -p [remind_options] file | rem2html [options]
=head1 OPTIONS
@@ -155,7 +155,7 @@ sub usage
print STDERR <<"EOM";
$TIDY_PROGNAME: Produce an HTML calendar from the output of "remind -pp"
Usage: remind -pp ... | rem2html [options]
Usage: remind -pp [remind_options] file | rem2html [options]
Options:

View File

@@ -336,10 +336,10 @@ rem2pdf - draw a PDF, SVG or PostScript calendar from Remind output
=head1 SYNOPSIS
remind -pp [options] file | rem2pdf [options] > output.pdf
remind -pp [options] file | rem2pdf --svg [options] > output.svg
remind -pp [options] file | rem2pdf --ps [options] > output.ps
remind -pp [options] file | rem2pdf --eps [options] > output.eps
remind -pp [remind_options] file | rem2pdf [options] > output.pdf
remind -pp [remind_options] file | rem2pdf --svg [options] > output.svg
remind -pp [remind_options] file | rem2pdf --ps [options] > output.ps
remind -pp [remind_options] file | rem2pdf --eps [options] > output.eps
=head1 DESCRIPTION

View File

@@ -1,54 +1,119 @@
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define if you have the <glob.h> header file */
#undef HAVE_GLOB_H
/* Define if you have <stdint.h> */
#undef HAVE_STDINT_H
#undef HAVE_STRINGS_H
#undef HAVE_STRDUP
#undef HAVE_STRCASECMP
#undef HAVE_STRNCASECMP
#undef HAVE_WCTYPE_H
#undef HAVE_LOCALE_H
#undef HAVE_INOTIFY_INIT1
#undef HAVE_LANGINFO_H
/* Configuration command used to build Remind */
#undef CONFIG_CMD
/* Define to 1 if you have the `glob' function. */
#undef HAVE_GLOB
#undef HAVE_SETENV
/* Define to 1 if you have the <glob.h> header file. */
#undef HAVE_GLOB_H
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
#undef HAVE_UNSETENV
/* Define to 1 if you have the `inotify_init1' function. */
#undef HAVE_INOTIFY_INIT1
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the `mbstowcs' function. */
#undef HAVE_MBSTOWCS
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* The number of bytes in a unsigned int. */
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `unsetenv' function. */
#undef HAVE_UNSETENV
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `time_t', as computed by sizeof. */
#undef SIZEOF_TIME_T
/* The size of `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
/* The number of bytes in a unsigned long. */
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
#define PACKAGE_NAME "@PACKAGE_NAME@"
#define PACKAGE_URL "@PACKAGE_URL@"
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
#define CONFIG_CMD "@CONFIG_CMD@"
#include "custom.h"
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
#include <custom.h>

View File

@@ -15,7 +15,7 @@
#include <stdio.h> /* For FILE */
#define DBUF_STATIC_SIZE 128
#define DBUF_STATIC_SIZE 32
typedef struct {
char *buffer;
size_t len;

View File

@@ -5439,11 +5439,159 @@ REM SATISFY 0
../tests/test.rem(1044): Trig = Sunday, 14 July, 1991
../tests/test.rem(1044): Trig = Monday, 15 July, 1991
../tests/test.rem(1044): Can't compute trigger
REM SATSIFY ""
../tests/test.rem(1045): Missing REM type; assuming MSG
REM SATISFY ""
../tests/test.rem(1045): SATISFY: constant "" will never be true
../tests/test.rem(1045): Trig = Saturday, 16 February, 1991
SATSIFY ""
../tests/test.rem(1045): Trig = Sunday, 17 February, 1991
../tests/test.rem(1045): Trig = Monday, 18 February, 1991
../tests/test.rem(1045): Trig = Tuesday, 19 February, 1991
../tests/test.rem(1045): Trig = Wednesday, 20 February, 1991
../tests/test.rem(1045): Trig = Thursday, 21 February, 1991
../tests/test.rem(1045): Trig = Friday, 22 February, 1991
../tests/test.rem(1045): Trig = Saturday, 23 February, 1991
../tests/test.rem(1045): Trig = Sunday, 24 February, 1991
../tests/test.rem(1045): Trig = Monday, 25 February, 1991
../tests/test.rem(1045): Trig = Tuesday, 26 February, 1991
../tests/test.rem(1045): Trig = Wednesday, 27 February, 1991
../tests/test.rem(1045): Trig = Thursday, 28 February, 1991
../tests/test.rem(1045): Trig = Friday, 1 March, 1991
../tests/test.rem(1045): Trig = Saturday, 2 March, 1991
../tests/test.rem(1045): Trig = Sunday, 3 March, 1991
../tests/test.rem(1045): Trig = Monday, 4 March, 1991
../tests/test.rem(1045): Trig = Tuesday, 5 March, 1991
../tests/test.rem(1045): Trig = Wednesday, 6 March, 1991
../tests/test.rem(1045): Trig = Thursday, 7 March, 1991
../tests/test.rem(1045): Trig = Friday, 8 March, 1991
../tests/test.rem(1045): Trig = Saturday, 9 March, 1991
../tests/test.rem(1045): Trig = Sunday, 10 March, 1991
../tests/test.rem(1045): Trig = Monday, 11 March, 1991
../tests/test.rem(1045): Trig = Tuesday, 12 March, 1991
../tests/test.rem(1045): Trig = Wednesday, 13 March, 1991
../tests/test.rem(1045): Trig = Thursday, 14 March, 1991
../tests/test.rem(1045): Trig = Friday, 15 March, 1991
../tests/test.rem(1045): Trig = Saturday, 16 March, 1991
../tests/test.rem(1045): Trig = Sunday, 17 March, 1991
../tests/test.rem(1045): Trig = Monday, 18 March, 1991
../tests/test.rem(1045): Trig = Tuesday, 19 March, 1991
../tests/test.rem(1045): Trig = Wednesday, 20 March, 1991
../tests/test.rem(1045): Trig = Thursday, 21 March, 1991
../tests/test.rem(1045): Trig = Friday, 22 March, 1991
../tests/test.rem(1045): Trig = Saturday, 23 March, 1991
../tests/test.rem(1045): Trig = Sunday, 24 March, 1991
../tests/test.rem(1045): Trig = Monday, 25 March, 1991
../tests/test.rem(1045): Trig = Tuesday, 26 March, 1991
../tests/test.rem(1045): Trig = Wednesday, 27 March, 1991
../tests/test.rem(1045): Trig = Thursday, 28 March, 1991
../tests/test.rem(1045): Trig = Friday, 29 March, 1991
../tests/test.rem(1045): Trig = Saturday, 30 March, 1991
../tests/test.rem(1045): Trig = Sunday, 31 March, 1991
../tests/test.rem(1045): Trig = Monday, 1 April, 1991
../tests/test.rem(1045): Trig = Tuesday, 2 April, 1991
../tests/test.rem(1045): Trig = Wednesday, 3 April, 1991
../tests/test.rem(1045): Trig = Thursday, 4 April, 1991
../tests/test.rem(1045): Trig = Friday, 5 April, 1991
../tests/test.rem(1045): Trig = Saturday, 6 April, 1991
../tests/test.rem(1045): Trig = Sunday, 7 April, 1991
../tests/test.rem(1045): Trig = Monday, 8 April, 1991
../tests/test.rem(1045): Trig = Tuesday, 9 April, 1991
../tests/test.rem(1045): Trig = Wednesday, 10 April, 1991
../tests/test.rem(1045): Trig = Thursday, 11 April, 1991
../tests/test.rem(1045): Trig = Friday, 12 April, 1991
../tests/test.rem(1045): Trig = Saturday, 13 April, 1991
../tests/test.rem(1045): Trig = Sunday, 14 April, 1991
../tests/test.rem(1045): Trig = Monday, 15 April, 1991
../tests/test.rem(1045): Trig = Tuesday, 16 April, 1991
../tests/test.rem(1045): Trig = Wednesday, 17 April, 1991
../tests/test.rem(1045): Trig = Thursday, 18 April, 1991
../tests/test.rem(1045): Trig = Friday, 19 April, 1991
../tests/test.rem(1045): Trig = Saturday, 20 April, 1991
../tests/test.rem(1045): Trig = Sunday, 21 April, 1991
../tests/test.rem(1045): Trig = Monday, 22 April, 1991
../tests/test.rem(1045): Trig = Tuesday, 23 April, 1991
../tests/test.rem(1045): Trig = Wednesday, 24 April, 1991
../tests/test.rem(1045): Trig = Thursday, 25 April, 1991
../tests/test.rem(1045): Trig = Friday, 26 April, 1991
../tests/test.rem(1045): Trig = Saturday, 27 April, 1991
../tests/test.rem(1045): Trig = Sunday, 28 April, 1991
../tests/test.rem(1045): Trig = Monday, 29 April, 1991
../tests/test.rem(1045): Trig = Tuesday, 30 April, 1991
../tests/test.rem(1045): Trig = Wednesday, 1 May, 1991
../tests/test.rem(1045): Trig = Thursday, 2 May, 1991
../tests/test.rem(1045): Trig = Friday, 3 May, 1991
../tests/test.rem(1045): Trig = Saturday, 4 May, 1991
../tests/test.rem(1045): Trig = Sunday, 5 May, 1991
../tests/test.rem(1045): Trig = Monday, 6 May, 1991
../tests/test.rem(1045): Trig = Tuesday, 7 May, 1991
../tests/test.rem(1045): Trig = Wednesday, 8 May, 1991
../tests/test.rem(1045): Trig = Thursday, 9 May, 1991
../tests/test.rem(1045): Trig = Friday, 10 May, 1991
../tests/test.rem(1045): Trig = Saturday, 11 May, 1991
../tests/test.rem(1045): Trig = Sunday, 12 May, 1991
../tests/test.rem(1045): Trig = Monday, 13 May, 1991
../tests/test.rem(1045): Trig = Tuesday, 14 May, 1991
../tests/test.rem(1045): Trig = Wednesday, 15 May, 1991
../tests/test.rem(1045): Trig = Thursday, 16 May, 1991
../tests/test.rem(1045): Trig = Friday, 17 May, 1991
../tests/test.rem(1045): Trig = Saturday, 18 May, 1991
../tests/test.rem(1045): Trig = Sunday, 19 May, 1991
../tests/test.rem(1045): Trig = Monday, 20 May, 1991
../tests/test.rem(1045): Trig = Tuesday, 21 May, 1991
../tests/test.rem(1045): Trig = Wednesday, 22 May, 1991
../tests/test.rem(1045): Trig = Thursday, 23 May, 1991
../tests/test.rem(1045): Trig = Friday, 24 May, 1991
../tests/test.rem(1045): Trig = Saturday, 25 May, 1991
../tests/test.rem(1045): Trig = Sunday, 26 May, 1991
../tests/test.rem(1045): Trig = Monday, 27 May, 1991
../tests/test.rem(1045): Trig = Tuesday, 28 May, 1991
../tests/test.rem(1045): Trig = Wednesday, 29 May, 1991
../tests/test.rem(1045): Trig = Thursday, 30 May, 1991
../tests/test.rem(1045): Trig = Friday, 31 May, 1991
../tests/test.rem(1045): Trig = Saturday, 1 June, 1991
../tests/test.rem(1045): Trig = Sunday, 2 June, 1991
../tests/test.rem(1045): Trig = Monday, 3 June, 1991
../tests/test.rem(1045): Trig = Tuesday, 4 June, 1991
../tests/test.rem(1045): Trig = Wednesday, 5 June, 1991
../tests/test.rem(1045): Trig = Thursday, 6 June, 1991
../tests/test.rem(1045): Trig = Friday, 7 June, 1991
../tests/test.rem(1045): Trig = Saturday, 8 June, 1991
../tests/test.rem(1045): Trig = Sunday, 9 June, 1991
../tests/test.rem(1045): Trig = Monday, 10 June, 1991
../tests/test.rem(1045): Trig = Tuesday, 11 June, 1991
../tests/test.rem(1045): Trig = Wednesday, 12 June, 1991
../tests/test.rem(1045): Trig = Thursday, 13 June, 1991
../tests/test.rem(1045): Trig = Friday, 14 June, 1991
../tests/test.rem(1045): Trig = Saturday, 15 June, 1991
../tests/test.rem(1045): Trig = Sunday, 16 June, 1991
../tests/test.rem(1045): Trig = Monday, 17 June, 1991
../tests/test.rem(1045): Trig = Tuesday, 18 June, 1991
../tests/test.rem(1045): Trig = Wednesday, 19 June, 1991
../tests/test.rem(1045): Trig = Thursday, 20 June, 1991
../tests/test.rem(1045): Trig = Friday, 21 June, 1991
../tests/test.rem(1045): Trig = Saturday, 22 June, 1991
../tests/test.rem(1045): Trig = Sunday, 23 June, 1991
../tests/test.rem(1045): Trig = Monday, 24 June, 1991
../tests/test.rem(1045): Trig = Tuesday, 25 June, 1991
../tests/test.rem(1045): Trig = Wednesday, 26 June, 1991
../tests/test.rem(1045): Trig = Thursday, 27 June, 1991
../tests/test.rem(1045): Trig = Friday, 28 June, 1991
../tests/test.rem(1045): Trig = Saturday, 29 June, 1991
../tests/test.rem(1045): Trig = Sunday, 30 June, 1991
../tests/test.rem(1045): Trig = Monday, 1 July, 1991
../tests/test.rem(1045): Trig = Tuesday, 2 July, 1991
../tests/test.rem(1045): Trig = Wednesday, 3 July, 1991
../tests/test.rem(1045): Trig = Thursday, 4 July, 1991
../tests/test.rem(1045): Trig = Friday, 5 July, 1991
../tests/test.rem(1045): Trig = Saturday, 6 July, 1991
../tests/test.rem(1045): Trig = Sunday, 7 July, 1991
../tests/test.rem(1045): Trig = Monday, 8 July, 1991
../tests/test.rem(1045): Trig = Tuesday, 9 July, 1991
../tests/test.rem(1045): Trig = Wednesday, 10 July, 1991
../tests/test.rem(1045): Trig = Thursday, 11 July, 1991
../tests/test.rem(1045): Trig = Friday, 12 July, 1991
../tests/test.rem(1045): Trig = Saturday, 13 July, 1991
../tests/test.rem(1045): Trig = Sunday, 14 July, 1991
../tests/test.rem(1045): Trig = Monday, 15 July, 1991
../tests/test.rem(1045): Can't compute trigger
REM SATISFY [version() > "01.00.00"]
../tests/test.rem(1046): SATISFY: expression has no reference to trigdate() or $T...
../tests/test.rem(1046): Trig = Saturday, 16 February, 1991

View File

@@ -1042,7 +1042,7 @@ REM SATISFY recursive_t(2)
# These should be diagnosed
REM SATISFY 0
REM SATSIFY ""
REM SATISFY ""
REM SATISFY [version() > "01.00.00"]
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]