Compare commits

..

18 Commits

Author SHA1 Message Date
Dianne Skoll
8b5fe4f2a0 Update WHATSNEW for 04.02.01 release. 2022-12-15 09:34:02 -05:00
Dianne Skoll
98fc4a917f Bump version to 04.02.01 2022-12-15 09:24:30 -05:00
Dianne Skoll
e633530a36 Fix stray %" 2022-11-15 08:24:52 -05:00
Dianne Skoll
bfea9915b9 Remove unnecessary %"...%" markers. 2022-11-14 12:37:17 -05:00
Clément Bœsch
d68ed6e75d Add French holidays courtesy of Clément Bœsch 2022-11-14 12:20:43 -05:00
Dianne Skoll
a22631d768 Document need for Noto Fonts in TkRemind. 2022-11-01 13:40:44 -04:00
Dianne Skoll
552bf84e33 Make test *not* depend on the current date... *sigh*. 2022-10-24 09:41:40 -04:00
Dianne Skoll
28d0251093 If we use "-m" in ExtraRemindArgs, set $MondayFirst in tkremind
Patch courtesy of Luís Henriques
2022-10-24 09:35:27 -04:00
Dianne Skoll
f3d969f658 Make sure we print the banner on each iteration of a command-line '*rep' 2022-10-20 18:21:57 -04:00
Dianne Skoll
2afe95d090 Fix typo in comment. 2022-10-18 17:25:59 -04:00
Dianne Skoll
3692a6b265 Avoid ambiguous local<->UTC conversions right around when the clocks change. 2022-10-17 09:58:32 -04:00
Dianne Skoll
8fc19358bb Double-up on "%" in a printf formatting string. 2022-10-17 08:29:38 -04:00
Dianne Skoll
c8f9773d83 Speed up FindFunc. 2022-10-14 13:53:50 -04:00
Dianne Skoll
e1091db82f Don't try to use -ffat-lto-objects with clang 2022-10-14 13:31:57 -04:00
Dianne Skoll
9f8ed13434 Remove a whole lot of unused / dead code. 2022-10-14 13:26:56 -04:00
Dianne Skoll
914f03d5eb Fix bad comment. 2022-10-14 11:45:04 -04:00
Dianne Skoll
a801f6d4ce Token names are already lower-case. 2022-10-14 11:43:36 -04:00
Dianne Skoll
fde5a7b4ca Can use strcmp rather than StrCmpI in FindOperator since they are not alphabetic 2022-10-14 11:41:11 -04:00
16 changed files with 219 additions and 125 deletions

9
README
View File

@@ -64,6 +64,15 @@ TkRemind requires Tcl/Tk and the tcllib library.
- On Arch Linux, you need tk and tcllib. The latter is available at
https://aur.archlinux.org/packages/tcllib
If the little arrows for "Previous Month" and "Next Month" do not display
correctly in TkRemind, you may need to install the Noto Fonts. Install
all of your distribution's Nonto Font-related packages.
- On Debian-like systems, install with:
apt install fonts-noto-core fonts-noto-color-emoji \
fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra
==========================================================================
Contact info: mailto:dianne@skoll.ca
Home page: https://dianne.skoll.ca/projects/remind/

16
configure vendored
View File

@@ -3975,7 +3975,14 @@ fi
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
for f in -flto=auto -ffat-lto-objects; do
f=-flto=auto
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
$as_echo_n "checking whether $CC supports $f... " >&6; }
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$CFLAGS $f"
f=-ffat-lto-objects
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
$as_echo_n "checking whether $CC supports $f... " >&6; }
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
@@ -3986,7 +3993,10 @@ $as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test "$ac_cv_perlartifacts" = "yes" ; then
@@ -4015,7 +4025,7 @@ _ACEOF
fi
done
VERSION=04.02.00
VERSION=04.02.01

View File

@@ -47,7 +47,12 @@ AC_HEADER_TIME
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
for f in -flto=auto -ffat-lto-objects; do
f=-flto=auto
AC_MSG_CHECKING([whether $CC supports $f])
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS $f"
f=-ffat-lto-objects
AC_MSG_CHECKING([whether $CC supports $f])
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
AC_MSG_RESULT([yes])
@@ -55,7 +60,9 @@ if test "$GCC" = yes; then
else
AC_MSG_RESULT([no])
fi
done
else
AC_MSG_RESULT([no])
fi
fi
if test "$ac_cv_perlartifacts" = "yes" ; then
@@ -73,7 +80,7 @@ if test "$?" != 0 ; then
exit 1
fi
AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups)
VERSION=04.02.00
VERSION=04.02.01
AC_SUBST(VERSION)
AC_SUBST(PERL)
AC_SUBST(PERLARTIFACTS)

View File

@@ -1,5 +1,33 @@
CHANGES TO REMIND
* VERSION 4.2 Patch 1 - 2022-12-15
- MINOR IMPROVEMENT: TkRemind: If "Extra Remind Options" contains -m, make
TkRemind start the calendar with Monday instead of Sunday.
- MINOR IMPROVEMENT: Sample files: Add French holidays courtesy of
Clément Bœsch.
- MINOR IMPROVEMENT: A few performance fixes, likely not even noticeable in
most cases.
- MINOR FIXES: Fix misleading comments in the source code.
- MINOR FIX: Remove a bunch of dead code in the moon-phase routines.
- MINOR FIX: Remove unnecessary %"...%" markers in holidays/us.rem
- MINOR FIX: Don't use the -ffat-lto-objects if we're compiling with Clang.
- MINOR FIX: Remind: Fix a broken printf-format string (need to double up on %
to get a literal % in the output.)
- BUG FIX: Make test suite pass regardless of the date on which it is run.
D'oh!!!
- BUG FIX: Make sure the banner gets printed each time through a "*N"
command-line option loop.
* VERSION 4.2 Patch 0 - 2022-10-14
- NEW FEATURE: remind: Allow weekdays to be globally-omitted. For example:

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

@@ -0,0 +1,20 @@
#
# France Holidays
#
# Source: Article L3133-1
# 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 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 Jul 14 MSG %"Fête nationale%"
REM Aug 15 MSG %"Assomption%"
REM Nov 1 MSG %"La Toussaint%"
REM Nov 11 MSG %"Armistice%"
REM Dec 25 MSG %"Noël%"

View File

@@ -2,22 +2,22 @@
# This file is part of REMIND.
# Copyright (C) 1992-2022 Dianne Skoll
REM [easterdate($Uy)-46] MSG %"Ash Wednesday%"
REM [easterdate($Uy)-7] MSG %"Palm Sunday%"
OMIT [easterdate($Uy)-2] MSG %"Good Friday%"
REM [easterdate($Uy)-46] MSG Ash Wednesday
REM [easterdate($Uy)-7] MSG Palm Sunday
OMIT [easterdate($Uy)-2] MSG Good Friday
OMIT [easterdate($Uy)] MSG %"Easter%" Sunday
REM [easterdate($Uy)+39] MSG %"Ascension Day%"
REM [easterdate($Uy)+49] MSG %"Pentecost%"
REM [easterdate($Uy)+39] MSG Ascension Day
REM [easterdate($Uy)+49] MSG Pentecost
# Some holidays are omitted, some are not. You may want to change
# which ones are omitted.
OMIT Jan 1 MSG %"New Year's Day%"
OMIT Jan 1 MSG New Year's Day
REM Third Monday in Jan MSG Martin Luther King - %"MLK Day%"
REM Feb 2 MSG %"Ground Hog Day%"
REM Feb 14 MSG %"Valentine's Day%"
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG %"President's Day%"
REM Mar 17 MSG %"St. Patrick's Day%"
REM Feb 2 MSG Ground Hog Day
REM Feb 14 MSG Valentine's Day
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG President's Day
REM Mar 17 MSG St. Patrick's Day
# These are accurate for most places in North America
REM MAYBE-UNCOMPUTABLE Sun November SATISFY [isdst($T) != isdst($T+1)] MSG Daylight Saving Time Ends
@@ -25,30 +25,30 @@ REM MAYBE-UNCOMPUTABLE Sun March SATISFY [isdst($T) != isdst($T+1)] MSG Daylight
REM Apr 1 MSG %"April Fool's%" Day
REM Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
REM May 5 MSG %"Cinco de Mayo%"
REM First Sat in May MSG %"Kentucky Derby%"
REM Second Sun in May MSG %"Mother's Day%"
REM Third Sat in May MSG %"Armed Forces Day%"
REM Last Monday in May SCANFROM -7 ADDOMIT MSG %"Memorial Day%"
REM Jun 14 MSG %"Flag Day%"
REM May 5 MSG Cinco de Mayo
REM First Sat in May MSG Kentucky Derby
REM Second Sun in May MSG Mother's Day
REM Third Sat in May MSG Armed Forces Day
REM Last Monday in May SCANFROM -7 ADDOMIT MSG Memorial Day
REM Jun 14 MSG Flag Day
REM July 4 SCANFROM -7 ADDOMIT MSG Independence Day
REM July 3 SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Independence Day (observed)
REM July 5 SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Independence Day (observed)
REM Third Sun in June MSG %"Father's Day%"
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG %"Labor Day%"
REM Second Mon in Oct MSG %"Columbus Day / Indigenous Peoples' Day%"
REM Nov 11 MSG %"Veterans Day%"
REM Third Sun in June MSG Father's Day
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG Labor Day
REM Second Mon in Oct MSG Columbus Day / Indigenous Peoples' Day
REM Nov 11 MSG Veterans Day
REM Oct 30 MSG %"Mischief Night%"
REM Oct 31 MSG %"Halloween%"
REM Oct 30 MSG Mischief Night
REM Oct 31 MSG Halloween
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG %"Election Day%"
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG Election Day
REM Thu 22 Nov SCANFROM -7 ADDOMIT MSG %"Thanksgiving Day%"
REM Thu 22 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving Day
REM Fri 23 Nov SCANFROM -7 ADDOMIT MSG %"Thanksgiving (cont.)%"
REM Fri 23 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving (cont.)
REM Dec 24 MSG %"Christmas Eve%"
REM Dec 24 MSG Christmas Eve
OMIT Dec 25 MSG %"Christmas%" Day

View File

@@ -955,6 +955,7 @@ proc WriteOptionsToFile {} {
#***********************************************************************
proc LoadOptions {} {
global Option ConfigFile
global MondayFirst
set problem [catch {set f [open "$ConfigFile" "r"]}]
if {$problem} {
return
@@ -974,6 +975,9 @@ proc LoadOptions {} {
set Option($key) $val
}
close $f
if {[regexp -- {-m.*} $Option(ExtraRemindArgs)]} {
set MondayFirst 1
}
font configure CalboxFont {*}$Option(CalboxFont)
font configure HeadingFont {*}$Option(HeadingFont)
}

View File

@@ -244,7 +244,7 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
}
}
if (!c) {
Wprint("Warning: Unterminated %{...} substitution sequence");
Wprint("Warning: Unterminated %%{...} substitution sequence");
}
if (UserFuncExists(s) != 3) {
continue;

View File

@@ -1194,9 +1194,9 @@ static int LogNot(void)
/***************************************************************/
/* */
/* FindFunc */
/* FindOperator */
/* */
/* Find a function. */
/* Find an operator. */
/* */
/***************************************************************/
Operator *FindOperator(char const *name, Operator where[], int num)
@@ -1205,7 +1205,7 @@ Operator *FindOperator(char const *name, Operator where[], int num)
int mid, r;
while (top >= bot) {
mid = (top + bot) / 2;
r = StrCmpi(name, where[mid].name);
r = strcmp(name, where[mid].name);
if (!r) return &where[mid];
else if (r > 0) bot = mid+1;
else top = mid-1;
@@ -1213,6 +1213,20 @@ Operator *FindOperator(char const *name, Operator where[], int num)
return NULL;
}
/* Compare two strings case-insensitively, where we KNOW
that the second string is definitely lower-case */
static int strcmp_lcfirst(char const *s1, char const *s2)
{
int r;
while (*s1 && *s2) {
r = tolower(*s1) - *s2;
if (r) return r;
s1++;
s2++;
}
return tolower(*s1) - *s2;
}
/***************************************************************/
/* */
/* FindFunc */
@@ -1226,7 +1240,7 @@ BuiltinFunc *FindFunc(char const *name, BuiltinFunc where[], int num)
int mid, r;
while (top >= bot) {
mid = (top + bot) / 2;
r = StrCmpi(name, where[mid].name);
r = strcmp_lcfirst(name, where[mid].name);
if (!r) return &where[mid];
else if (r > 0) bot = mid+1;
else top = mid-1;

View File

@@ -176,6 +176,8 @@ static void DoReminders(void)
Parser p;
int purge_handled;
DidMsgReminder = 0;
if (!UseStdin) {
FileAccessDate = GetAccessDate(InitialFile);
} else {

View File

@@ -400,8 +400,8 @@ static double phase(double pdate,
double *suangdia)
{
double Day, N, M, Ec, Lambdasun, ml, MM, MN, Ev, Ae, A3, MmP,
mEc, A4, lP, V, lPP, NP, y, x, Lambdamoon,
double Day, N, M, Ec, Lambdasun, ml, MM, Ev, Ae, A3, MmP,
mEc, A4, lP, V, lPP,
MoonAge, MoonPhase,
MoonDist, MoonDFrac, MoonAng,
F, SunDist, SunAng;
@@ -431,9 +431,6 @@ static double phase(double pdate,
/* Moon's mean anomaly */
MM = fixangle(ml - 0.1114041 * Day - mmlongp);
/* Moon's ascending node mean longitude */
MN = fixangle(mlnode - 0.0529539 * Day);
/* Evection */
Ev = 1.2739 * sin(torad(2 * (ml - Lambdasun) - MM));
@@ -461,19 +458,6 @@ static double phase(double pdate,
/* 1 longitude */
lPP = lP + V;
/* Corrected longitude of the node */
NP = MN - 0.16 * sin(torad(M));
/* Y inclination coordinate */
y = sin(torad(lPP - NP)) * cos(torad(minc));
/* X inclination coordinate */
x = cos(torad(lPP - NP));
/* Ecliptic longitude */
Lambdamoon = todeg(atan2(y, x));
Lambdamoon += NP;
/* Calculation of the phase of the Moon */
/* Age of the Moon in degrees */

View File

@@ -355,7 +355,8 @@ static int TokStrCmp(Token const *t, char const *s)
register int r;
char const *tk = t->name;
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
r = tolower(*tk) - tolower(*s);
/* t->name is already lower-case */
r = *tk - tolower(*s);
tk++;
s++;
if (r) return r;
@@ -363,5 +364,5 @@ static int TokStrCmp(Token const *t, char const *s)
/* Ignore trailing commas on s */
if (!*s || (*s == ',' && !*(s+1))) return 0;
return (tolower(*tk) - tolower(*s));
return (*tk - tolower(*s));
}

View File

@@ -55,7 +55,7 @@ static void DestroyLocalVals (UserFunc *f);
/***************************************************************/
/* */
/* DoFset */
/* DoFunset */
/* */
/* Undefine a user-defined function - the FUNSET command. */
/* */

View File

@@ -398,6 +398,9 @@ EOF
TZ=America/Toronto ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
TZ=Europe/Berlin ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
# Test that banner is printed on every iteration
echo "MSG Should be three banners." | ../src/remind - 2022-10-20 '*3' >> ../tests/test.out 2>&1
# Remove references to SysInclude, which is build-specific
grep -F -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out
cmp -s ../tests/test.out ../tests/test.cmp

View File

@@ -1060,7 +1060,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "04.02.00"
version() => "04.02.01"
set a059 wkday(today())
today() => 1991-02-16
wkday(1991-02-16) => "Saturday"
@@ -2627,7 +2627,7 @@ a086 4
a109 2012-01-01
a128 2018-02-03@16:45
a039 "February"
a058 "04.02.00"
a058 "04.02.01"
a077 "1992 92\n"
a096 -4
a119 -1
@@ -10334,20 +10334,20 @@ STDOUT is a: PIPE
set a localtoutc('2022-01-01@12:00')
localtoutc(2022-01-01@12:00) => 2022-01-01@17:00
set a localtoutc('2022-03-13@02:59')
localtoutc(2022-03-13@02:59) => 2022-03-13@07:59
set a localtoutc('2022-03-13@03:00')
localtoutc(2022-03-13@03:00) => 2022-03-13@07:00
set a localtoutc('2022-03-13@03:01')
localtoutc(2022-03-13@03:01) => 2022-03-13@07:01
set a localtoutc('2022-03-13@03:59')
localtoutc(2022-03-13@03:59) => 2022-03-13@07:59
set a localtoutc('2022-03-13@04:00')
localtoutc(2022-03-13@04:00) => 2022-03-13@08:00
set a localtoutc('2022-03-13@04:01')
localtoutc(2022-03-13@04:01) => 2022-03-13@08:01
set a localtoutc('2022-06-01@12:00')
localtoutc(2022-06-01@12:00) => 2022-06-01@16:00
set a localtoutc('2022-11-06@01:59')
localtoutc(2022-11-06@01:59) => 2022-11-06@05:59
set a localtoutc('2022-11-06@02:00')
localtoutc(2022-11-06@02:00) => 2022-11-06@07:00
set a localtoutc('2022-11-06@02:01')
localtoutc(2022-11-06@02:01) => 2022-11-06@07:01
set a localtoutc('2022-11-06@02:59')
localtoutc(2022-11-06@02:59) => 2022-11-06@07:59
set a localtoutc('2022-11-06@03:00')
localtoutc(2022-11-06@03:00) => 2022-11-06@08:00
set a localtoutc('2022-11-06@03:01')
localtoutc(2022-11-06@03:01) => 2022-11-06@08:01
set a localtoutc('2022-12-01@12:00')
localtoutc(2022-12-01@12:00) => 2022-12-01@17:00
@@ -10355,10 +10355,10 @@ set b utctolocal('2022-01-01@17:00')
utctolocal(2022-01-01@17:00) => 2022-01-01@12:00
set b utctolocal('2022-03-13@06:00')
utctolocal(2022-03-13@06:00) => 2022-03-13@01:00
set b utctolocal('2022-03-13@06:01')
utctolocal(2022-03-13@06:01) => 2022-03-13@01:01
set b utctolocal('2022-03-13@06:59')
utctolocal(2022-03-13@06:59) => 2022-03-13@01:59
set b utctolocal('2022-03-13@07:01')
utctolocal(2022-03-13@07:01) => 2022-03-13@03:01
set b utctolocal('2022-03-13@07:59')
utctolocal(2022-03-13@07:59) => 2022-03-13@03:59
set b utctolocal('2022-03-13@07:00')
utctolocal(2022-03-13@07:00) => 2022-03-13@03:00
set b utctolocal('2022-03-13@07:01')
@@ -10367,20 +10367,20 @@ set b utctolocal('2022-03-13@07:59')
utctolocal(2022-03-13@07:59) => 2022-03-13@03:59
set b utctolocal('2022-06-01@16:00')
utctolocal(2022-06-01@16:00) => 2022-06-01@12:00
set b utctolocal('2022-11-06@05:59')
utctolocal(2022-11-06@05:59) => 2022-11-06@01:59
set b utctolocal('2022-11-06@06:00')
utctolocal(2022-11-06@06:00) => 2022-11-06@01:00
set b utctolocal('2022-11-06@06:01')
utctolocal(2022-11-06@06:01) => 2022-11-06@01:01
set b utctolocal('2022-11-06@06:59')
utctolocal(2022-11-06@06:59) => 2022-11-06@01:59
set b utctolocal('2022-11-06@03:59')
utctolocal(2022-11-06@03:59) => 2022-11-05@23:59
set b utctolocal('2022-11-06@07:00')
utctolocal(2022-11-06@07:00) => 2022-11-06@02:00
set b utctolocal('2022-11-06@07:01')
utctolocal(2022-11-06@07:01) => 2022-11-06@02:01
set b utctolocal('2022-12-01@17:00')
utctolocal(2022-12-01@17:00) => 2022-12-01@12:00
set b utctolocal('2022-11-06@07:59')
utctolocal(2022-11-06@07:59) => 2022-11-06@02:59
set b utctolocal('2022-11-06@08:00')
utctolocal(2022-11-06@08:00) => 2022-11-06@03:00
set b utctolocal('2022-11-06@08:01')
utctolocal(2022-11-06@08:01) => 2022-11-06@03:01
set b utctolocal('2022-12-01@18:00')
utctolocal(2022-12-01@18:00) => 2022-12-01@13:00
set c timezone('2022-07-01')
timezone(2022-07-01) => "EDT"
@@ -10392,20 +10392,20 @@ No reminders.
set a localtoutc('2022-01-01@12:00')
localtoutc(2022-01-01@12:00) => 2022-01-01@11:00
set a localtoutc('2022-03-13@02:59')
localtoutc(2022-03-13@02:59) => 2022-03-13@01:59
set a localtoutc('2022-03-13@03:00')
localtoutc(2022-03-13@03:00) => 2022-03-13@02:00
set a localtoutc('2022-03-13@03:01')
localtoutc(2022-03-13@03:01) => 2022-03-13@02:01
set a localtoutc('2022-03-13@03:59')
localtoutc(2022-03-13@03:59) => 2022-03-13@02:59
set a localtoutc('2022-03-13@04:00')
localtoutc(2022-03-13@04:00) => 2022-03-13@03:00
set a localtoutc('2022-03-13@04:01')
localtoutc(2022-03-13@04:01) => 2022-03-13@03:01
set a localtoutc('2022-06-01@12:00')
localtoutc(2022-06-01@12:00) => 2022-06-01@10:00
set a localtoutc('2022-11-06@01:59')
localtoutc(2022-11-06@01:59) => 2022-11-06@00:59
set a localtoutc('2022-11-06@02:00')
localtoutc(2022-11-06@02:00) => 2022-11-06@01:00
set a localtoutc('2022-11-06@02:01')
localtoutc(2022-11-06@02:01) => 2022-11-06@01:01
set a localtoutc('2022-11-06@02:59')
localtoutc(2022-11-06@02:59) => 2022-11-06@01:59
set a localtoutc('2022-11-06@03:00')
localtoutc(2022-11-06@03:00) => 2022-11-06@02:00
set a localtoutc('2022-11-06@03:01')
localtoutc(2022-11-06@03:01) => 2022-11-06@02:01
set a localtoutc('2022-12-01@12:00')
localtoutc(2022-12-01@12:00) => 2022-12-01@11:00
@@ -10413,10 +10413,10 @@ set b utctolocal('2022-01-01@17:00')
utctolocal(2022-01-01@17:00) => 2022-01-01@18:00
set b utctolocal('2022-03-13@06:00')
utctolocal(2022-03-13@06:00) => 2022-03-13@07:00
set b utctolocal('2022-03-13@06:01')
utctolocal(2022-03-13@06:01) => 2022-03-13@07:01
set b utctolocal('2022-03-13@06:59')
utctolocal(2022-03-13@06:59) => 2022-03-13@07:59
set b utctolocal('2022-03-13@07:01')
utctolocal(2022-03-13@07:01) => 2022-03-13@08:01
set b utctolocal('2022-03-13@07:59')
utctolocal(2022-03-13@07:59) => 2022-03-13@08:59
set b utctolocal('2022-03-13@07:00')
utctolocal(2022-03-13@07:00) => 2022-03-13@08:00
set b utctolocal('2022-03-13@07:01')
@@ -10425,20 +10425,20 @@ set b utctolocal('2022-03-13@07:59')
utctolocal(2022-03-13@07:59) => 2022-03-13@08:59
set b utctolocal('2022-06-01@16:00')
utctolocal(2022-06-01@16:00) => 2022-06-01@18:00
set b utctolocal('2022-11-06@05:59')
utctolocal(2022-11-06@05:59) => 2022-11-06@06:59
set b utctolocal('2022-11-06@06:00')
utctolocal(2022-11-06@06:00) => 2022-11-06@07:00
set b utctolocal('2022-11-06@06:01')
utctolocal(2022-11-06@06:01) => 2022-11-06@07:01
set b utctolocal('2022-11-06@06:59')
utctolocal(2022-11-06@06:59) => 2022-11-06@07:59
set b utctolocal('2022-11-06@03:59')
utctolocal(2022-11-06@03:59) => 2022-11-06@04:59
set b utctolocal('2022-11-06@07:00')
utctolocal(2022-11-06@07:00) => 2022-11-06@08:00
set b utctolocal('2022-11-06@07:01')
utctolocal(2022-11-06@07:01) => 2022-11-06@08:01
set b utctolocal('2022-12-01@17:00')
utctolocal(2022-12-01@17:00) => 2022-12-01@18:00
set b utctolocal('2022-11-06@07:59')
utctolocal(2022-11-06@07:59) => 2022-11-06@08:59
set b utctolocal('2022-11-06@08:00')
utctolocal(2022-11-06@08:00) => 2022-11-06@09:00
set b utctolocal('2022-11-06@08:01')
utctolocal(2022-11-06@08:01) => 2022-11-06@09:01
set b utctolocal('2022-12-01@18:00')
utctolocal(2022-12-01@18:00) => 2022-12-01@19:00
set c timezone('2022-07-01')
timezone(2022-07-01) => "CEST"
@@ -10446,3 +10446,15 @@ set c timezone('2022-12-01')
timezone(2022-12-01) => "CET"
No reminders.
Reminders for Thursday, 20th October, 2022:
Should be three banners.
Reminders for Friday, 21st October, 2022:
Should be three banners.
Reminders for Saturday, 22nd October, 2022:
Should be three banners.

View File

@@ -1,30 +1,30 @@
# Test conversion between local time and UTC
set a localtoutc('2022-01-01@12:00')
set a localtoutc('2022-03-13@02:59')
set a localtoutc('2022-03-13@03:00')
set a localtoutc('2022-03-13@03:01')
set a localtoutc('2022-03-13@03:59')
set a localtoutc('2022-03-13@04:00')
set a localtoutc('2022-03-13@04:01')
set a localtoutc('2022-06-01@12:00')
set a localtoutc('2022-11-06@01:59')
set a localtoutc('2022-11-06@02:00')
set a localtoutc('2022-11-06@02:01')
set a localtoutc('2022-11-06@02:59')
set a localtoutc('2022-11-06@03:00')
set a localtoutc('2022-11-06@03:01')
set a localtoutc('2022-12-01@12:00')
set b utctolocal('2022-01-01@17:00')
set b utctolocal('2022-03-13@06:00')
set b utctolocal('2022-03-13@06:01')
set b utctolocal('2022-03-13@06:59')
set b utctolocal('2022-03-13@07:01')
set b utctolocal('2022-03-13@07:59')
set b utctolocal('2022-03-13@07:00')
set b utctolocal('2022-03-13@07:01')
set b utctolocal('2022-03-13@07:59')
set b utctolocal('2022-06-01@16:00')
set b utctolocal('2022-11-06@05:59')
set b utctolocal('2022-11-06@06:00')
set b utctolocal('2022-11-06@06:01')
set b utctolocal('2022-11-06@06:59')
set b utctolocal('2022-11-06@03:59')
set b utctolocal('2022-11-06@07:00')
set b utctolocal('2022-11-06@07:01')
set b utctolocal('2022-12-01@17:00')
set b utctolocal('2022-11-06@07:59')
set b utctolocal('2022-11-06@08:00')
set b utctolocal('2022-11-06@08:01')
set b utctolocal('2022-12-01@18:00')
set c timezone('2022-07-01')
set c timezone('2022-12-01')