mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 14:28:40 +02:00
Compare commits
67 Commits
05.04.00-B
...
05.04.02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ab8897577 | ||
|
|
9613417a2e | ||
|
|
f808a2963d | ||
|
|
96a4dc3189 | ||
|
|
3c60285466 | ||
|
|
6fed350e1f | ||
|
|
9f220555af | ||
|
|
005ccef953 | ||
|
|
578c98c865 | ||
|
|
64bf3381c6 | ||
|
|
02ade6fc58 | ||
|
|
2954fca8d8 | ||
|
|
8356dacf2a | ||
|
|
4fd145cf4e | ||
|
|
1af2bdf8f1 | ||
|
|
9b98e65e01 | ||
|
|
0f83b98698 | ||
|
|
4fd62f9894 | ||
|
|
cc06592fe0 | ||
|
|
21d28ebfc3 | ||
|
|
b300422cdb | ||
|
|
37e09f4671 | ||
|
|
b6e53341c8 | ||
|
|
896fcf1d7f | ||
|
|
72155329f2 | ||
|
|
36c7db510a | ||
|
|
d4aa73747d | ||
|
|
3ed657b708 | ||
|
|
0441c0263b | ||
|
|
c40d4ee672 | ||
|
|
96f2d6537a | ||
|
|
dc777c95df | ||
|
|
3090d77346 | ||
|
|
157d2821f3 | ||
|
|
71d2da19a8 | ||
|
|
516b9c81b3 | ||
|
|
58d0e38f1a | ||
|
|
68d487ade9 | ||
|
|
9d42879170 | ||
|
|
db70aabc97 | ||
|
|
c8f55ef60b | ||
|
|
44b50fc6be | ||
|
|
a69a96529b | ||
|
|
f4e5cc63a6 | ||
|
|
136122b1db | ||
|
|
4cc63b1548 | ||
|
|
9390b4335b | ||
|
|
1fcf11a816 | ||
|
|
c4107e6a6f | ||
|
|
ab03232341 | ||
|
|
51a65841cd | ||
|
|
5035deaff1 | ||
|
|
09caa8988a | ||
|
|
9624b1045c | ||
|
|
102748397f | ||
|
|
f852f7e7e5 | ||
|
|
8d88192483 | ||
|
|
a6ca571fe5 | ||
|
|
2af783a58d | ||
|
|
af2daa7a87 | ||
|
|
c5bc459dd9 | ||
|
|
edf26eaa14 | ||
|
|
7e5dc26ee5 | ||
|
|
4c2b6031cd | ||
|
|
af8c1630c3 | ||
|
|
0ec43d570c | ||
|
|
1df8b12e71 |
33
README.md
33
README.md
@@ -55,6 +55,39 @@ edit custom.h on your behalf:
|
||||
|
||||
`wish ./build.tk`
|
||||
|
||||
## Usage
|
||||
|
||||
Remind is a large and complex program. You can read the full manual page
|
||||
with:
|
||||
|
||||
`man remind`
|
||||
|
||||
after installation. However, the man page is long and detailed and is
|
||||
more of a reference than an introduction. You can get an overview
|
||||
with a [slide deck](https://dianne.skoll.ca/projects/remind/download/remind-oclug.pdf)
|
||||
I made a while back. There's also a (long) [YouTube video](https://www.youtube.com/watch?v=0SNgvsDvx7M) that serves as an
|
||||
introduction to Remind.
|
||||
|
||||
## A Note about AI
|
||||
|
||||
1. No part of Remind was written using AI of any type.<br><br>
|
||||
I certify that all of the C, Perl and Tcl code in Remind was written
|
||||
by a human being. I certify that all code in `.rem` files other than
|
||||
ones under `include/holidays` was written by a human being. The code
|
||||
under `include/holidays` was derived from the Python "holidays" library
|
||||
and I have no direct knowledge of the provenance of that library,
|
||||
though I suspect it's entirely or almost entirely human-written.
|
||||
|
||||
2. No AI-generated patches or other sorts of contributions to Remind
|
||||
will be accepted.
|
||||
|
||||
3. Remind's source code may not be used to train an AI model,
|
||||
including an LLM model, unless all of the output of said model is
|
||||
released under the GNU General Public License, version 2. If you use
|
||||
any of Remind's source code to train your model, then anything that
|
||||
the model produces is a derived product of Remind and must be licensed
|
||||
under the same terms as Remind.
|
||||
|
||||
---
|
||||
|
||||
Contact info: dianne@skoll.ca
|
||||
|
||||
18
configure
vendored
18
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for remind 05.04.00.
|
||||
# Generated by GNU Autoconf 2.71 for remind 05.04.02.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
|
||||
@@ -608,8 +608,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='remind'
|
||||
PACKAGE_TARNAME='remind'
|
||||
PACKAGE_VERSION='05.04.00'
|
||||
PACKAGE_STRING='remind 05.04.00'
|
||||
PACKAGE_VERSION='05.04.02'
|
||||
PACKAGE_STRING='remind 05.04.02'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
|
||||
|
||||
@@ -1265,7 +1265,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures remind 05.04.00 to adapt to many kinds of systems.
|
||||
\`configure' configures remind 05.04.02 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1327,7 +1327,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of remind 05.04.00:";;
|
||||
short | recursive ) echo "Configuration of remind 05.04.02:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1415,7 +1415,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
remind configure 05.04.00
|
||||
remind configure 05.04.02
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -1865,7 +1865,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by remind $as_me 05.04.00, which was
|
||||
It was created by remind $as_me 05.04.02, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -4710,7 +4710,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by remind $as_me 05.04.00, which was
|
||||
This file was extended by remind $as_me 05.04.02, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -4775,7 +4775,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
remind config.status 05.04.00
|
||||
remind config.status 05.04.02
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(remind, 05.04.00, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_INIT(remind, 05.04.02, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_CONFIG_SRCDIR([src/queue.c])
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
(defconst remind-builtin-functions
|
||||
(sort
|
||||
(list "_" "abs" "access" "adawn" "adusk" "ampm" "ansicolor" "args" "asc"
|
||||
"baseyr" "catch" "catcherr" "char" "choose" "coerce" "columns" "current" "date"
|
||||
"baseyr" "catch" "catcherr" "char" "choose" "coerce" "columns" "const" "current" "date"
|
||||
"datepart" "datetime" "dawn" "day" "daysinmon" "defined" "dosubst"
|
||||
"dusk" "easterdate" "escape" "eval" "evaltrig" "filedate" "filedatetime"
|
||||
"filedir" "filename" "getenv" "hebdate" "hebday" "hebmon" "hebyear"
|
||||
|
||||
@@ -1,6 +1,41 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* VERSION 5.4 Patch 0 - 2025-??-??
|
||||
* VERSION 5,4 Patch 2 - 2025-07-16
|
||||
|
||||
- MINOR CHANGE: remind: Allow daysinmon() to take a DATE or DATETIME
|
||||
argument.
|
||||
|
||||
- MINOR CHANGE: remind: All functions that want an integer month number
|
||||
will now also accept a string naming the month.
|
||||
|
||||
= UPDATE: include/holidays/chinese-new-year.rem: Add dates for Chinese
|
||||
New Year for 2051 through 2100.
|
||||
|
||||
- BUG FIX: remind: Set trigdate() correctly for a fully-specified
|
||||
date, even if it's in the past, as the manual documnented. Bug
|
||||
found by Tim Chase.
|
||||
|
||||
- DOCUMENTATION FIX: rem2html: Document the correct Perl module
|
||||
prerequisites.
|
||||
|
||||
- CODE FIXES: remind: Various minor improvements to the code with
|
||||
no user-visible changes.
|
||||
|
||||
* VERSION 5.4 Patch 1 - 2025-06-15
|
||||
|
||||
- MAJOR BUG FIX: remind: In some circumstances, a REM command could
|
||||
yield a trigger date after its UNTIL date, rather than recognizing it
|
||||
as having expired. This has been fixed. Bug found by Ian! D. Allen.
|
||||
|
||||
- BUG FIX: rem2pdf: Support the COLOUR special (as well as COLOR).
|
||||
|
||||
- MINOR IMPROVEMENT: Add include/utils/add-html-anchors.rem. You can
|
||||
INCLUDE this file to get HTML anchors added to every calendar day
|
||||
by rem2html.
|
||||
|
||||
- DOCUMENTATION: Add NOTE-ABOUT-AI.txt
|
||||
|
||||
* VERSION 5.4 Patch 0 - 2025-06-03
|
||||
|
||||
- MAJOR IMPROVEMENT: remind: Track which expressions and variables
|
||||
Remind can prove to its satisfaction are "constant" - that is, that
|
||||
@@ -11,16 +46,38 @@ CHANGES TO REMIND
|
||||
See the new remind(1) man page section "NON-CONSTANT EXPRESSIONS"
|
||||
|
||||
- MINOR NEW FEATURE: remind: add the "nonconst" built-in function (to
|
||||
force an expression to be interpreted as non-constant) and the
|
||||
"isconst" function to test if an expression is constant.
|
||||
force an expression to be interpreted as non-constant), the "const"
|
||||
function to force an expression to be interpreted as constant, and
|
||||
the "isconst" function to test if an expression is constant.
|
||||
|
||||
- MINOR NEW FEATURE: remind: Add eval() built-in function that takes a
|
||||
string argument and evaluates it as an expression.
|
||||
string argument and evaluates it as an expression. For safety, the
|
||||
"shell" function is disabled inside an eval().
|
||||
|
||||
- MINOR NEW FEATURE: remind: add the "u" debugging flag to warn you if
|
||||
you set a variable that is not subsequently used.
|
||||
|
||||
- MINOR NEW FEATURE: remind: Add the trigbase() function and
|
||||
corresponding $Tb system variable. See the remind(1) man page for
|
||||
details.
|
||||
|
||||
- MINOR IMPROVEMENT: remind: make value("var", default) evaluate the
|
||||
second argument lazily: If "var" is defined, then the second
|
||||
argument is never evaluated.
|
||||
|
||||
- MINOR IMPROVEMENT: remind: Add syntax for redefining a function without
|
||||
issuing a warning. The syntax:
|
||||
|
||||
FSET - func(x) expr
|
||||
|
||||
is equivalent to:
|
||||
|
||||
FUNSET func
|
||||
FSET func(x) expr
|
||||
|
||||
- MINOR IMPROVEMENT: include/holidays: Update a bunch of files to use
|
||||
isany(n, a, b, c) rather than (n == a || n == b || n == c)
|
||||
|
||||
- MINOR IMPROVEMENT: remind: Make $Tu a synonym for triguntil().
|
||||
|
||||
- MINOR IMPROVEMENT: remind: If coerce() fails, issue a more detailed
|
||||
@@ -50,7 +107,7 @@ CHANGES TO REMIND
|
||||
corresponding weekday number returned.
|
||||
|
||||
- MINOR IMPROVEMENT: remind: Make the expression parser optimize away
|
||||
"- INT_CONSTANT" and "! INT_CONSTANT".
|
||||
the unary "-" and "!" operators when followed by an integer constant.
|
||||
|
||||
- BUG FIX: tests: Don't use the obsolete "tail +2" syntax in test-rem.
|
||||
Fix courtesy of Dick Marinus.
|
||||
@@ -1492,10 +1549,10 @@ CHANGES TO REMIND
|
||||
- NEW FEATURE: Add "-u+username" variant to tell Remind to switch users to
|
||||
"username" without disabling RUN directives. Idea courtesy of Ian! D. Allen
|
||||
|
||||
- CHANGE: rem2html: rem2html has been moved out of the www/ directory into
|
||||
its own rem2html/ directory. If your system has the prerequisites
|
||||
(namely Perl, Getopt::Long and JSON::Any) then rem2html will be installed
|
||||
by "make install".
|
||||
- CHANGE: rem2html: rem2html has been moved out of the www/ directory
|
||||
into its own rem2html/ directory. If your system has the
|
||||
prerequisites (namely Perl, Getopt::Long and JSON::MaybeXS) then
|
||||
rem2html will be installed by "make install".
|
||||
|
||||
- CHANGE: Remove "cm2rem". It was about 20 years obsolete.
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ if !defined("ansi_bold")
|
||||
set ansi_underline2 char(27) + "[21m"
|
||||
set ansi_overline char(27) + "[53m"
|
||||
endif
|
||||
preserve ansi_normal ansi_bold ansi_faint ansi_italic ansi_underline2 ansi_reverse ansi_strikeout ansi_underline2 ansi_overline
|
||||
preserve ansi_normal ansi_bold ansi_faint ansi_italic ansi_underline ansi_reverse ansi_strikeout ansi_underline2 ansi_overline
|
||||
endif
|
||||
|
||||
# Example: REM MSG I must [ansi_bold]emphasize[ansi_normal] \
|
||||
|
||||
@@ -6,28 +6,28 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Festat e Vitit të Ri
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Festat e Vitit të Ri (ditë pushimi e shtyrë)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Festat e Vitit të Ri (ditë pushimi e shtyrë)
|
||||
OMIT 2 January MSG Festat e Vitit të Ri
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 2))==0 || wkdaynum(date($Ty, 1, 2))==6] MSG Festat e Vitit të Ri (ditë pushimi e shtyrë)
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 2)), 0, 6)] MSG Festat e Vitit të Ri (ditë pushimi e shtyrë)
|
||||
OMIT 14 March MSG Dita e Verës
|
||||
REM 14 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 14))==0 || wkdaynum(date($Ty, 3, 14))==6] MSG Dita e Verës (ditë pushimi e shtyrë)
|
||||
REM 14 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 14)), 0, 6)] MSG Dita e Verës (ditë pushimi e shtyrë)
|
||||
OMIT 22 March MSG Dita e Nevruzit
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 22))==0 || wkdaynum(date($Ty, 3, 22))==6] MSG Dita e Nevruzit (ditë pushimi e shtyrë)
|
||||
REM 31 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 31))==0 || wkdaynum(date($Ty, 3, 31))==6] MSG E diela e Pashkëve Katolike (ditë pushimi e shtyrë)
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 22)), 0, 6)] MSG Dita e Nevruzit (ditë pushimi e shtyrë)
|
||||
REM 31 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 31)), 0, 6)] MSG E diela e Pashkëve Katolike (ditë pushimi e shtyrë)
|
||||
OMIT [easterdate($Uy)] MSG E diela e Pashkëve Katolike
|
||||
OMIT [easterdate($Uy)] MSG E diela e Pashkëve Ortodokse
|
||||
OMIT 1 May MSG Dita Ndërkombëtare e Punëtorëve
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Dita Ndërkombëtare e Punëtorëve (ditë pushimi e shtyrë)
|
||||
REM 5 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 5))==0 || wkdaynum(date($Ty, 5, 5))==6] MSG E diela e Pashkëve Ortodokse (ditë pushimi e shtyrë)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Dita Ndërkombëtare e Punëtorëve (ditë pushimi e shtyrë)
|
||||
REM 5 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 5)), 0, 6)] MSG E diela e Pashkëve Ortodokse (ditë pushimi e shtyrë)
|
||||
OMIT 5 September MSG Dita e Shenjtërimit të Shenjt Terezës
|
||||
REM 5 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 9, 5))==0 || wkdaynum(date($Ty, 9, 5))==6] MSG Dita e Shenjtërimit të Shenjt Terezës (ditë pushimi e shtyrë)
|
||||
REM 5 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 9, 5)), 0, 6)] MSG Dita e Shenjtërimit të Shenjt Terezës (ditë pushimi e shtyrë)
|
||||
OMIT 22 November MSG Dita e Alfabetit
|
||||
REM 22 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 11, 22))==0 || wkdaynum(date($Ty, 11, 22))==6] MSG Dita e Alfabetit (ditë pushimi e shtyrë)
|
||||
REM 22 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 11, 22)), 0, 6)] MSG Dita e Alfabetit (ditë pushimi e shtyrë)
|
||||
OMIT 28 November MSG Dita Flamurit dhe e Pavarësisë
|
||||
REM 28 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 11, 28))==0 || wkdaynum(date($Ty, 11, 28))==6] MSG Dita Flamurit dhe e Pavarësisë (ditë pushimi e shtyrë)
|
||||
REM 28 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 11, 28)), 0, 6)] MSG Dita Flamurit dhe e Pavarësisë (ditë pushimi e shtyrë)
|
||||
OMIT 29 November MSG Dita e Çlirimit
|
||||
REM 29 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 11, 29))==0 || wkdaynum(date($Ty, 11, 29))==6] MSG Dita e Çlirimit (ditë pushimi e shtyrë)
|
||||
REM 29 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 11, 29)), 0, 6)] MSG Dita e Çlirimit (ditë pushimi e shtyrë)
|
||||
OMIT 8 December MSG Dita Kombëtare e Rinisë
|
||||
REM 8 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 8))==0 || wkdaynum(date($Ty, 12, 8))==6] MSG Dita Kombëtare e Rinisë (ditë pushimi e shtyrë)
|
||||
REM 8 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 8)), 0, 6)] MSG Dita Kombëtare e Rinisë (ditë pushimi e shtyrë)
|
||||
OMIT 25 December MSG Krishtlindjet
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Krishtlindjet (ditë pushimi e shtyrë)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Krishtlindjet (ditë pushimi e shtyrë)
|
||||
|
||||
@@ -6,36 +6,36 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Yeni il bayramı
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Yeni il bayramı (müşahidə olunur)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Yeni il bayramı (müşahidə olunur)
|
||||
OMIT 2 January MSG Yeni il bayramı
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 2))==0 || wkdaynum(date($Ty, 1, 2))==6] MSG Yeni il bayramı (müşahidə olunur)
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 2)), 0, 6)] MSG Yeni il bayramı (müşahidə olunur)
|
||||
OMIT 20 January MSG Ümumxalq hüzn günü
|
||||
OMIT 8 March MSG Qadınlar günü
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 8))==0 || wkdaynum(date($Ty, 3, 8))==6] MSG Qadınlar günü (müşahidə olunur)
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 8)), 0, 6)] MSG Qadınlar günü (müşahidə olunur)
|
||||
OMIT 20 March MSG Novruz bayramı
|
||||
REM 20 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 20))==0 || wkdaynum(date($Ty, 3, 20))==6] MSG Novruz bayramı (müşahidə olunur)
|
||||
REM 20 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 20)), 0, 6)] MSG Novruz bayramı (müşahidə olunur)
|
||||
OMIT 21 March MSG Novruz bayramı
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 21))==0 || wkdaynum(date($Ty, 3, 21))==6] MSG Novruz bayramı (müşahidə olunur)
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 21)), 0, 6)] MSG Novruz bayramı (müşahidə olunur)
|
||||
OMIT 22 March MSG Novruz bayramı
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 22))==0 || wkdaynum(date($Ty, 3, 22))==6] MSG Novruz bayramı (müşahidə olunur)
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 22)), 0, 6)] MSG Novruz bayramı (müşahidə olunur)
|
||||
OMIT 23 March MSG Novruz bayramı
|
||||
REM 23 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 23))==0 || wkdaynum(date($Ty, 3, 23))==6] MSG Novruz bayramı (müşahidə olunur)
|
||||
REM 23 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 23)), 0, 6)] MSG Novruz bayramı (müşahidə olunur)
|
||||
OMIT 24 March MSG Novruz bayramı
|
||||
REM 24 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 24))==0 || wkdaynum(date($Ty, 3, 24))==6] MSG Novruz bayramı (müşahidə olunur)
|
||||
REM 24 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 24)), 0, 6)] MSG Novruz bayramı (müşahidə olunur)
|
||||
OMIT 9 May MSG Faşizm üzərində qələbə günü
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 9))==0 || wkdaynum(date($Ty, 5, 9))==6] MSG Faşizm üzərində qələbə günü (müşahidə olunur)
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 9)), 0, 6)] MSG Faşizm üzərində qələbə günü (müşahidə olunur)
|
||||
OMIT 28 May MSG Müstəqillik Günü
|
||||
REM 28 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 28))==0 || wkdaynum(date($Ty, 5, 28))==6] MSG Müstəqillik Günü (müşahidə olunur)
|
||||
REM 28 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 28)), 0, 6)] MSG Müstəqillik Günü (müşahidə olunur)
|
||||
OMIT 15 June MSG Azərbaycan xalqının milli qurtuluş günü
|
||||
REM 15 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 15))==0 || wkdaynum(date($Ty, 6, 15))==6] MSG Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)
|
||||
REM 15 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 15)), 0, 6)] MSG Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)
|
||||
OMIT 26 June MSG Azərbaycan Respublikasının Silahlı Qüvvələri günü
|
||||
REM 26 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 26))==0 || wkdaynum(date($Ty, 6, 26))==6] MSG Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)
|
||||
REM 26 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 26)), 0, 6)] MSG Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)
|
||||
OMIT 8 November MSG Zəfər Günü
|
||||
REM 8 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 11, 8))==0 || wkdaynum(date($Ty, 11, 8))==6] MSG Zəfər Günü (müşahidə olunur)
|
||||
REM 8 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 11, 8)), 0, 6)] MSG Zəfər Günü (müşahidə olunur)
|
||||
OMIT 9 November MSG Azərbaycan Respublikasının Dövlət bayrağı günü
|
||||
REM 9 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 11, 9))==0 || wkdaynum(date($Ty, 11, 9))==6] MSG Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)
|
||||
REM 9 November OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 11, 9)), 0, 6)] MSG Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)
|
||||
OMIT 31 December MSG Dünya azərbaycanlılarının həmrəyliyi günü
|
||||
REM 31 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 31))==0 || wkdaynum(date($Ty, 12, 31))==6] MSG Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)
|
||||
REM 31 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 31)), 0, 6)] MSG Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)
|
||||
|
||||
# Optional holidays
|
||||
REM 27 September MSG Anım Günü
|
||||
|
||||
@@ -6,29 +6,29 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Нова година
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Нова година (почивен ден)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Нова година (почивен ден)
|
||||
OMIT 3 March MSG Ден на Освобождението на България от османско иго
|
||||
REM 3 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 3))==0 || wkdaynum(date($Ty, 3, 3))==6] MSG Ден на Освобождението на България от османско иго (почивен ден)
|
||||
REM 3 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 3)), 0, 6)] MSG Ден на Освобождението на България от османско иго (почивен ден)
|
||||
OMIT [orthodoxeaster($Uy)-2] MSG Велики петък
|
||||
OMIT [orthodoxeaster($Uy)-1] MSG Велика събота
|
||||
OMIT [orthodoxeaster($Uy)] MSG Великден
|
||||
OMIT [orthodoxeaster($Uy)+1] MSG Великден
|
||||
OMIT 1 May MSG Ден на труда и на международната работническа солидарност
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Ден на труда и на международната работническа солидарност (почивен ден)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Ден на труда и на международната работническа солидарност (почивен ден)
|
||||
OMIT 6 May MSG Гергьовден, Ден на храбростта и Българската армия
|
||||
REM 6 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 6))==0 || wkdaynum(date($Ty, 5, 6))==6] MSG Гергьовден, Ден на храбростта и Българската армия (почивен ден)
|
||||
REM 6 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 6)), 0, 6)] MSG Гергьовден, Ден на храбростта и Българската армия (почивен ден)
|
||||
OMIT 24 May MSG Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност
|
||||
REM 24 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 24))==0 || wkdaynum(date($Ty, 5, 24))==6] MSG Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност (почивен ден)
|
||||
REM 24 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 24)), 0, 6)] MSG Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност (почивен ден)
|
||||
OMIT 6 September MSG Ден на Съединението
|
||||
REM 6 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 9, 6))==0 || wkdaynum(date($Ty, 9, 6))==6] MSG Ден на Съединението (почивен ден)
|
||||
REM 6 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 9, 6)), 0, 6)] MSG Ден на Съединението (почивен ден)
|
||||
OMIT 22 September MSG Ден на Независимостта на България
|
||||
REM 22 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 9, 22))==0 || wkdaynum(date($Ty, 9, 22))==6] MSG Ден на Независимостта на България (почивен ден)
|
||||
REM 22 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 9, 22)), 0, 6)] MSG Ден на Независимостта на България (почивен ден)
|
||||
OMIT 24 December MSG Бъдни вечер
|
||||
REM 24 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 24))==0 || wkdaynum(date($Ty, 12, 24))==6] MSG Бъдни вечер (почивен ден)
|
||||
REM 24 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 24)), 0, 6)] MSG Бъдни вечер (почивен ден)
|
||||
OMIT 25 December MSG Рождество Христово
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Рождество Христово (почивен ден)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Рождество Христово (почивен ден)
|
||||
OMIT 26 December MSG Рождество Христово
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 26))==0 || wkdaynum(date($Ty, 12, 26))==6] MSG Рождество Христово (почивен ден)
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 26)), 0, 6)] MSG Рождество Христово (почивен ден)
|
||||
|
||||
# Optional holidays
|
||||
REM 1 November MSG Ден на народните будители
|
||||
|
||||
@@ -28,3 +28,53 @@ REM 26 Jan 2047 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %
|
||||
REM 14 Feb 2048 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %(Chinese New Year) (%(Dragon))
|
||||
REM 2 Feb 2049 INFO "Url: https://en.wikipedia.org/wiki/Snake_(zodiac)" MSG %(Chinese New Year) (%(Snake))
|
||||
REM 23 Jan 2050 INFO "Url: https://en.wikipedia.org/wiki/Horse_(zodiac)" MSG %(Chinese New Year) (%(Horse))
|
||||
REM 11 Feb 2051 INFO "Url: https://en.wikipedia.org/wiki/Goat_(zodiac)" MSG %(Chinese New Year) (%(Goat))
|
||||
REM 1 Feb 2052 INFO "Url: https://en.wikipedia.org/wiki/Monkey_(zodiac)" MSG %(Chinese New Year) (%(Monkey))
|
||||
REM 19 Feb 2053 INFO "Url: https://en.wikipedia.org/wiki/Rooster_(zodiac)" MSG %(Chinese New Year) (%(Rooster))
|
||||
REM 8 Feb 2054 INFO "Url: https://en.wikipedia.org/wiki/Dog_(zodiac)" MSG %(Chinese New Year) (%(Dog))
|
||||
REM 28 Jan 2055 INFO "Url: https://en.wikipedia.org/wiki/Pig_(zodiac)" MSG %(Chinese New Year) (%(Pig))
|
||||
REM 15 Feb 2056 INFO "Url: https://en.wikipedia.org/wiki/Rat_(zodiac)" MSG %(Chinese New Year) (%(Rat))
|
||||
REM 4 Feb 2057 INFO "Url: https://en.wikipedia.org/wiki/Ox_(zodiac)" MSG %(Chinese New Year) (%(Ox))
|
||||
REM 24 Jan 2058 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %(Chinese New Year) (%(Tiger))
|
||||
REM 12 Feb 2059 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %(Chinese New Year) (%(Rabbit))
|
||||
REM 2 Feb 2060 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %(Chinese New Year) (%(Dragon))
|
||||
REM 21 Jan 2061 INFO "Url: https://en.wikipedia.org/wiki/Snake_(zodiac)" MSG %(Chinese New Year) (%(Snake))
|
||||
REM 9 Feb 2062 INFO "Url: https://en.wikipedia.org/wiki/Horse_(zodiac)" MSG %(Chinese New Year) (%(Horse))
|
||||
REM 29 Jan 2063 INFO "Url: https://en.wikipedia.org/wiki/Goat_(zodiac)" MSG %(Chinese New Year) (%(Goat))
|
||||
REM 17 Feb 2064 INFO "Url: https://en.wikipedia.org/wiki/Monkey_(zodiac)" MSG %(Chinese New Year) (%(Monkey))
|
||||
REM 5 Feb 2065 INFO "Url: https://en.wikipedia.org/wiki/Rooster_(zodiac)" MSG %(Chinese New Year) (%(Rooster))
|
||||
REM 26 Jan 2066 INFO "Url: https://en.wikipedia.org/wiki/Dog_(zodiac)" MSG %(Chinese New Year) (%(Dog))
|
||||
REM 14 Feb 2067 INFO "Url: https://en.wikipedia.org/wiki/Pig_(zodiac)" MSG %(Chinese New Year) (%(Pig))
|
||||
REM 3 Feb 2068 INFO "Url: https://en.wikipedia.org/wiki/Rat_(zodiac)" MSG %(Chinese New Year) (%(Rat))
|
||||
REM 23 Jan 2069 INFO "Url: https://en.wikipedia.org/wiki/Ox_(zodiac)" MSG %(Chinese New Year) (%(Ox))
|
||||
REM 11 Feb 2070 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %(Chinese New Year) (%(Tiger))
|
||||
REM 31 Jan 2071 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %(Chinese New Year) (%(Rabbit))
|
||||
REM 19 Feb 2072 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %(Chinese New Year) (%(Dragon))
|
||||
REM 7 Feb 2073 INFO "Url: https://en.wikipedia.org/wiki/Snake_(zodiac)" MSG %(Chinese New Year) (%(Snake))
|
||||
REM 27 Jan 2074 INFO "Url: https://en.wikipedia.org/wiki/Horse_(zodiac)" MSG %(Chinese New Year) (%(Horse))
|
||||
REM 15 Feb 2075 INFO "Url: https://en.wikipedia.org/wiki/Goat_(zodiac)" MSG %(Chinese New Year) (%(Goat))
|
||||
REM 5 Feb 2076 INFO "Url: https://en.wikipedia.org/wiki/Monkey_(zodiac)" MSG %(Chinese New Year) (%(Monkey))
|
||||
REM 24 Jan 2077 INFO "Url: https://en.wikipedia.org/wiki/Rooster_(zodiac)" MSG %(Chinese New Year) (%(Rooster))
|
||||
REM 12 Feb 2078 INFO "Url: https://en.wikipedia.org/wiki/Dog_(zodiac)" MSG %(Chinese New Year) (%(Dog))
|
||||
REM 2 Feb 2079 INFO "Url: https://en.wikipedia.org/wiki/Pig_(zodiac)" MSG %(Chinese New Year) (%(Pig))
|
||||
REM 22 Jan 2080 INFO "Url: https://en.wikipedia.org/wiki/Rat_(zodiac)" MSG %(Chinese New Year) (%(Rat))
|
||||
REM 9 Feb 2081 INFO "Url: https://en.wikipedia.org/wiki/Ox_(zodiac)" MSG %(Chinese New Year) (%(Ox))
|
||||
REM 29 Jan 2082 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %(Chinese New Year) (%(Tiger))
|
||||
REM 17 Feb 2083 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %(Chinese New Year) (%(Rabbit))
|
||||
REM 6 Feb 2084 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %(Chinese New Year) (%(Dragon))
|
||||
REM 26 Jan 2085 INFO "Url: https://en.wikipedia.org/wiki/Snake_(zodiac)" MSG %(Chinese New Year) (%(Snake))
|
||||
REM 14 Feb 2086 INFO "Url: https://en.wikipedia.org/wiki/Horse_(zodiac)" MSG %(Chinese New Year) (%(Horse))
|
||||
REM 3 Feb 2087 INFO "Url: https://en.wikipedia.org/wiki/Goat_(zodiac)" MSG %(Chinese New Year) (%(Goat))
|
||||
REM 24 Jan 2088 INFO "Url: https://en.wikipedia.org/wiki/Monkey_(zodiac)" MSG %(Chinese New Year) (%(Monkey))
|
||||
REM 10 Feb 2089 INFO "Url: https://en.wikipedia.org/wiki/Rooster_(zodiac)" MSG %(Chinese New Year) (%(Rooster))
|
||||
REM 30 Jan 2090 INFO "Url: https://en.wikipedia.org/wiki/Dog_(zodiac)" MSG %(Chinese New Year) (%(Dog))
|
||||
REM 18 Feb 2091 INFO "Url: https://en.wikipedia.org/wiki/Pig_(zodiac)" MSG %(Chinese New Year) (%(Pig))
|
||||
REM 7 Feb 2092 INFO "Url: https://en.wikipedia.org/wiki/Rat_(zodiac)" MSG %(Chinese New Year) (%(Rat))
|
||||
REM 27 Jan 2093 INFO "Url: https://en.wikipedia.org/wiki/Ox_(zodiac)" MSG %(Chinese New Year) (%(Ox))
|
||||
REM 15 Feb 2094 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %(Chinese New Year) (%(Tiger))
|
||||
REM 5 Feb 2095 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %(Chinese New Year) (%(Rabbit))
|
||||
REM 25 Jan 2096 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %(Chinese New Year) (%(Dragon))
|
||||
REM 12 Feb 2097 INFO "Url: https://en.wikipedia.org/wiki/Snake_(zodiac)" MSG %(Chinese New Year) (%(Snake))
|
||||
REM 1 Feb 2098 INFO "Url: https://en.wikipedia.org/wiki/Horse_(zodiac)" MSG %(Chinese New Year) (%(Horse))
|
||||
REM 21 Jan 2099 INFO "Url: https://en.wikipedia.org/wiki/Goat_(zodiac)" MSG %(Chinese New Year) (%(Goat))
|
||||
REM 9 Feb 2100 INFO "Url: https://en.wikipedia.org/wiki/Monkey_(zodiac)" MSG %(Chinese New Year) (%(Monkey))
|
||||
|
||||
@@ -26,7 +26,7 @@ REM 29 June ADDOMIT SCANFROM -28 SATISFY [$Tw != 2 && $Tw != 3 && $Tw != 4 && $T
|
||||
REM 2 July ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 29)) == 5] MSG San Pedro y San Pablo
|
||||
OMIT 16 July MSG Virgen del Carmen
|
||||
OMIT 15 August MSG Asunción de la Virgen
|
||||
REM 17 September ADDOMIT SCANFROM -28 SATISFY [$Tw == 1 || $Tw == 5] MSG Fiestas Patrias
|
||||
REM 17 September ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 1, 5)] MSG Fiestas Patrias
|
||||
OMIT 18 September MSG Día de la Independencia
|
||||
OMIT 19 September MSG Día de las Glorias del Ejército
|
||||
REM 20 September ADDOMIT SCANFROM -28 SATISFY [$Tw == 5] MSG Fiestas Patrias
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG New Year's Day
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG New Year's Day (observed)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG New Year's Day (observed)
|
||||
OMIT 11 February MSG Youth Day
|
||||
REM 11 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 11))==0 || wkdaynum(date($Ty, 2, 11))==6] MSG Youth Day (observed)
|
||||
REM 11 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 11)), 0, 6)] MSG Youth Day (observed)
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT 1 May MSG Labour Day
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Labour Day (observed)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Labour Day (observed)
|
||||
OMIT 20 May MSG National Day
|
||||
REM 20 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 20))==0 || wkdaynum(date($Ty, 5, 20))==6] MSG National Day (observed)
|
||||
REM 20 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 20)), 0, 6)] MSG National Day (observed)
|
||||
OMIT [easterdate($Uy)+39] MSG Ascension Day
|
||||
OMIT 15 August MSG Assumption Day
|
||||
REM 15 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 8, 15))==0 || wkdaynum(date($Ty, 8, 15))==6] MSG Assumption Day (observed)
|
||||
REM 15 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 8, 15)), 0, 6)] MSG Assumption Day (observed)
|
||||
OMIT 25 December MSG Christmas Day
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Christmas Day (observed)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Christmas Day (observed)
|
||||
|
||||
@@ -17,7 +17,7 @@ REM [orthodoxeaster($Uy)+1] MSG ΔΕΥΤΕΡΑ ΤΟΥ ΠΑΣΧΑ
|
||||
# minister decides moving that holiday. Here is a likely assumption of how this day might be moved.
|
||||
# Uncomment following lines to enable.
|
||||
|
||||
set PM date($Uy,5,1)
|
||||
# set PM date($Uy,5,1)
|
||||
# IF PM>=orthodoxeaster($Uy)-7 && PM<=orthodoxeaster($Uy)+1
|
||||
# IF PM<orthodoxeaster($Uy)-3
|
||||
# REM orthodoxeaster($Uy) -8 MSG πιθανόν ΕΡΓΑΤΙΚΗ Πρωτομαγιά
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG The first day of January
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG The first day of January (observed)
|
||||
REM 4 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4))==0 || wkdaynum(date($Ty, 4, 4))==6] MSG Ching Ming Festival (observed)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG The first day of January (observed)
|
||||
REM 4 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 4)), 0, 6)] MSG Ching Ming Festival (observed)
|
||||
OMIT 1 May MSG Labour Day
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Labour Day (observed)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Labour Day (observed)
|
||||
OMIT 1 July MSG Hong Kong Special Administrative Region Establishment Day
|
||||
REM 1 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 7, 1))==0 || wkdaynum(date($Ty, 7, 1))==6] MSG Hong Kong Special Administrative Region Establishment Day (observed)
|
||||
REM 1 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 7, 1)), 0, 6)] MSG Hong Kong Special Administrative Region Establishment Day (observed)
|
||||
OMIT 1 October MSG National Day
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 1))==0 || wkdaynum(date($Ty, 10, 1))==6] MSG National Day (observed)
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 1)), 0, 6)] MSG National Day (observed)
|
||||
OMIT 25 December MSG Christmas Day
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Christmas Day (observed)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Christmas Day (observed)
|
||||
OMIT 26 December MSG The first weekday after Christmas Day
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 26))==0 || wkdaynum(date($Ty, 12, 26))==6] MSG The first weekday after Christmas Day (observed)
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 26)), 0, 6)] MSG The first weekday after Christmas Day (observed)
|
||||
|
||||
# Optional holidays
|
||||
REM [easterdate($Uy)-2] MSG Good Friday
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG New Year's Day
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG New Year's Day (substitute day)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG New Year's Day (substitute day)
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT [easterdate($Uy)+1] MSG Easter Monday
|
||||
REM First Monday in May ADDOMIT SCANFROM -28 MSG May Bank Holiday
|
||||
@@ -14,6 +14,6 @@ REM 9 May ADDOMIT SCANFROM -28 SATISFY [$Tw != 0] MSG Liberation Day
|
||||
REM Last Monday in May ADDOMIT SCANFROM -28 MSG Spring Bank Holiday
|
||||
REM Last Monday in August ADDOMIT SCANFROM -28 MSG Summer Bank Holiday
|
||||
OMIT 25 December MSG Christmas Day
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Christmas Day (substitute day)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Christmas Day (substitute day)
|
||||
OMIT 26 December MSG Boxing Day
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 26))==0 || wkdaynum(date($Ty, 12, 26))==6] MSG Boxing Day (substitute day)
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 26)), 0, 6)] MSG Boxing Day (substitute day)
|
||||
|
||||
@@ -14,9 +14,6 @@ FSET _h2(x, y) HEBDATE(x, y, $U-7)
|
||||
FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1)
|
||||
FSET _BackTwoFri(x, y) IIF(WKDAYNUM(_h2(x,y))!=5, _h2(x,y), _h2(x,y)-2)
|
||||
FSET _BackTwoSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)-2)
|
||||
# Default values in case InIsrael and Reform are not set
|
||||
SET InIsrael VALUE("InIsrael", 0)
|
||||
SET Reform VALUE("Reform", 0)
|
||||
|
||||
REM [hebdate(1, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Rosh_Hashanah" MSG Rosh Hashana 1
|
||||
|
||||
|
||||
@@ -6,29 +6,29 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Жаңа жыл
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Жаңа жыл (қайта белгіленген демалыс)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Жаңа жыл (қайта белгіленген демалыс)
|
||||
OMIT 2 January MSG Жаңа жыл
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 2))==0 || wkdaynum(date($Ty, 1, 2))==6] MSG Жаңа жыл (қайта белгіленген демалыс)
|
||||
REM 2 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 2)), 0, 6)] MSG Жаңа жыл (қайта белгіленген демалыс)
|
||||
OMIT 7 January MSG Православиелік Рождество
|
||||
OMIT 8 March MSG Халықаралық әйелдер күні
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 8))==0 || wkdaynum(date($Ty, 3, 8))==6] MSG Халықаралық әйелдер күні (қайта белгіленген демалыс)
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 8)), 0, 6)] MSG Халықаралық әйелдер күні (қайта белгіленген демалыс)
|
||||
OMIT 21 March MSG Наурыз мейрамы
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 21))==0 || wkdaynum(date($Ty, 3, 21))==6] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 21)), 0, 6)] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
OMIT 22 March MSG Наурыз мейрамы
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 22))==0 || wkdaynum(date($Ty, 3, 22))==6] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
REM 22 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 22)), 0, 6)] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
OMIT 23 March MSG Наурыз мейрамы
|
||||
REM 23 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 23))==0 || wkdaynum(date($Ty, 3, 23))==6] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
REM 23 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 23)), 0, 6)] MSG Наурыз мейрамы (қайта белгіленген демалыс)
|
||||
OMIT 1 May MSG Қазақстан халқының бірлігі мерекесі
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Қазақстан халқының бірлігі мерекесі (қайта белгіленген демалыс)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Қазақстан халқының бірлігі мерекесі (қайта белгіленген демалыс)
|
||||
OMIT 7 May MSG Отан Қорғаушы күні
|
||||
REM 7 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 7))==0 || wkdaynum(date($Ty, 5, 7))==6] MSG Отан Қорғаушы күні (қайта белгіленген демалыс)
|
||||
REM 7 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 7)), 0, 6)] MSG Отан Қорғаушы күні (қайта белгіленген демалыс)
|
||||
OMIT 9 May MSG Жеңіс күні
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 9))==0 || wkdaynum(date($Ty, 5, 9))==6] MSG Жеңіс күні (қайта белгіленген демалыс)
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 9)), 0, 6)] MSG Жеңіс күні (қайта белгіленген демалыс)
|
||||
OMIT 6 July MSG Астана күні
|
||||
REM 6 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 7, 6))==0 || wkdaynum(date($Ty, 7, 6))==6] MSG Астана күні (қайта белгіленген демалыс)
|
||||
REM 6 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 7, 6)), 0, 6)] MSG Астана күні (қайта белгіленген демалыс)
|
||||
OMIT 30 August MSG Қазақстан Республикасының Конституциясы күні
|
||||
REM 30 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 8, 30))==0 || wkdaynum(date($Ty, 8, 30))==6] MSG Қазақстан Республикасының Конституциясы күні (қайта белгіленген демалыс)
|
||||
REM 30 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 8, 30)), 0, 6)] MSG Қазақстан Республикасының Конституциясы күні (қайта белгіленген демалыс)
|
||||
OMIT 25 October MSG Республика күні
|
||||
REM 25 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 25))==0 || wkdaynum(date($Ty, 10, 25))==6] MSG Республика күні (қайта белгіленген демалыс)
|
||||
REM 25 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 25)), 0, 6)] MSG Республика күні (қайта белгіленген демалыс)
|
||||
OMIT 16 December MSG Тəуелсіздік күні
|
||||
REM 16 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 16))==0 || wkdaynum(date($Ty, 12, 16))==6] MSG Тəуелсіздік күні (қайта белгіленген демалыс)
|
||||
REM 16 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 16)), 0, 6)] MSG Тəуелсіздік күні (қайта белгіленген демалыс)
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG ວັນປີໃໝ່ສາກົນ
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG ພັກຊົດເຊີຍວັນປີໃໝ່ສາກົນ
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG ພັກຊົດເຊີຍວັນປີໃໝ່ສາກົນ
|
||||
OMIT 8 March MSG ວັນແມ່ຍິງສາກົນ
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 8))==0 || wkdaynum(date($Ty, 3, 8))==6] MSG ພັກຊົດເຊີຍວັນແມ່ຍິງສາກົນ
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 8)), 0, 6)] MSG ພັກຊົດເຊີຍວັນແມ່ຍິງສາກົນ
|
||||
OMIT 13 April MSG ບຸນປີໃໝ່ລາວ
|
||||
REM 13 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 13))==0 || wkdaynum(date($Ty, 4, 13))==6] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
REM 13 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 13)), 0, 6)] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
OMIT 14 April MSG ບຸນປີໃໝ່ລາວ
|
||||
REM 14 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 14))==0 || wkdaynum(date($Ty, 4, 14))==6] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
REM 14 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 14)), 0, 6)] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
OMIT 15 April MSG ບຸນປີໃໝ່ລາວ
|
||||
REM 15 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 15))==0 || wkdaynum(date($Ty, 4, 15))==6] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
REM 15 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 15)), 0, 6)] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
OMIT 16 April MSG ບຸນປີໃໝ່ລາວ
|
||||
REM 16 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 16))==0 || wkdaynum(date($Ty, 4, 16))==6] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
REM 16 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 16)), 0, 6)] MSG ພັກຊົດເຊີຍບຸນປີໃໝ່ລາວ
|
||||
OMIT 1 May MSG ວັນກຳມະກອນສາກົນ
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG ພັກຊົດເຊີຍວັນກຳມະກອນສາກົນ
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG ພັກຊົດເຊີຍວັນກຳມະກອນສາກົນ
|
||||
OMIT 2 December MSG ວັນຊາດ
|
||||
REM 2 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 2))==0 || wkdaynum(date($Ty, 12, 2))==6] MSG ພັກຊົດເຊີຍວັນຊາດ
|
||||
REM 2 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 2)), 0, 6)] MSG ພັກຊົດເຊີຍວັນຊາດ
|
||||
|
||||
# Optional holidays
|
||||
REM 20 January MSG ວັນສ້າງຕັ້ງກອງທັບປະຊາຊົນລາວ
|
||||
@@ -37,7 +37,7 @@ REM 15 August MSG ວັນລັດຖະທໍາມະນູນແຫ່ງ
|
||||
REM 23 August MSG ວັນຍຶດອຳນາດທົ່ວປະເທດ
|
||||
REM 7 October MSG ວັນຄູແຫ່ງຊາດ
|
||||
REM 7 October MSG ວັນສ້າງຕັ້ງທະນາຄານແຫ່ງ ສປປ ລາວ
|
||||
REM 7 October OMIT SAT SUN AFTER SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 7))==0 || wkdaynum(date($Ty, 10, 7))==6] MSG ພັກຊົດເຊີຍວັນສ້າງຕັ້ງທະນາຄານແຫ່ງ ສປປ ລາວ
|
||||
REM 7 October OMIT SAT SUN AFTER SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 7)), 0, 6)] MSG ພັກຊົດເຊີຍວັນສ້າງຕັ້ງທະນາຄານແຫ່ງ ສປປ ລາວ
|
||||
REM 12 October MSG ວັນປະກາດເອກະລາດ
|
||||
REM 13 December MSG ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ໄກສອນ ພົມວິຫານ
|
||||
REM 27 December SCANFROM -28 SATISFY [$Tw >= 3 && $Tw <= 5] MSG ສາມວັນລັດຖະການສຸດທ້າຍຂອງທຸກໆປີ
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
# [$SysInclude]/holidays/my/
|
||||
|
||||
OMIT 1 May MSG Hari Pekerja
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Cuti Hari Pekerja
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Cuti Hari Pekerja
|
||||
REM First Monday in June ADDOMIT SCANFROM -28 MSG Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong
|
||||
REM 3 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 3))==0 || wkdaynum(date($Ty, 6, 3))==6] MSG Cuti Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong
|
||||
REM 3 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 3)), 0, 6)] MSG Cuti Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong
|
||||
OMIT 31 August MSG Hari Kebangsaan
|
||||
REM 31 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 8, 31))==0 || wkdaynum(date($Ty, 8, 31))==6] MSG Cuti Hari Kebangsaan
|
||||
REM 31 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 8, 31)), 0, 6)] MSG Cuti Hari Kebangsaan
|
||||
OMIT 16 September MSG Hari Malaysia
|
||||
OMIT 25 December MSG Hari Krismas
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Cuti Hari Krismas
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Cuti Hari Krismas
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 20 February MSG Hari Pengisytiharan Tarikh Kemerdekaan
|
||||
REM 20 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 20))==0 || wkdaynum(date($Ty, 2, 20))==6] MSG Cuti Hari Pengisytiharan Tarikh Kemerdekaan
|
||||
REM 20 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 20)), 0, 6)] MSG Cuti Hari Pengisytiharan Tarikh Kemerdekaan
|
||||
OMIT 24 August MSG Hari Jadi Yang di-Pertua Negeri Melaka
|
||||
REM 24 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 8, 24))==0 || wkdaynum(date($Ty, 8, 24))==6] MSG Cuti Hari Jadi Yang di-Pertua Negeri Melaka
|
||||
REM 24 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 8, 24)), 0, 6)] MSG Cuti Hari Jadi Yang di-Pertua Negeri Melaka
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 14 January MSG Hari Keputeraan Yang di-Pertuan Besar Negeri Sembilan
|
||||
REM 14 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 14))==0 || wkdaynum(date($Ty, 1, 14))==6] MSG Cuti Hari Keputeraan Yang di-Pertuan Besar Negeri Sembilan
|
||||
REM 14 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 14)), 0, 6)] MSG Cuti Hari Keputeraan Yang di-Pertuan Besar Negeri Sembilan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 22 May MSG Hari Hol Sultan Pahang
|
||||
OMIT 30 July MSG Hari Keputeraan Sultan Pahang
|
||||
REM 30 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 7, 30))==0 || wkdaynum(date($Ty, 7, 30))==6] MSG Cuti Hari Keputeraan Sultan Pahang
|
||||
REM 30 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 7, 30)), 0, 6)] MSG Cuti Hari Keputeraan Sultan Pahang
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 7 July MSG Hari Ulang Tahun Perisytiharan Tapak Warisan Dunia
|
||||
REM Second Saturday in July ADDOMIT SCANFROM -28 MSG Hari Jadi Yang di-Pertua Negeri Pulau Pinang
|
||||
REM 13 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 7, 13))==0 || wkdaynum(date($Ty, 7, 13))==6] MSG Cuti Hari Jadi Yang di-Pertua Negeri Pulau Pinang
|
||||
REM 13 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 7, 13)), 0, 6)] MSG Cuti Hari Jadi Yang di-Pertua Negeri Pulau Pinang
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
REM First Friday in November ADDOMIT SCANFROM -28 MSG Hari Keputeraan Sultan Perak
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 17 May MSG Hari Ulang Tahun Keputeraan Raja Perlis
|
||||
REM 17 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 17))==0 || wkdaynum(date($Ty, 5, 17))==6] MSG Cuti Hari Ulang Tahun Keputeraan Raja Perlis
|
||||
REM 17 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 17)), 0, 6)] MSG Cuti Hari Ulang Tahun Keputeraan Raja Perlis
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 11 December MSG Hari Keputeraan Sultan Selangor
|
||||
REM 11 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 11))==0 || wkdaynum(date($Ty, 12, 11))==6] MSG Cuti Hari Keputeraan Sultan Selangor
|
||||
REM 11 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 11)), 0, 6)] MSG Cuti Hari Keputeraan Sultan Selangor
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 4 March MSG Hari Ulang Tahun Pertabalan Sultan Terengganu
|
||||
REM 4 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 4))==0 || wkdaynum(date($Ty, 3, 4))==6] MSG Cuti Hari Ulang Tahun Pertabalan Sultan Terengganu
|
||||
REM 4 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 4)), 0, 6)] MSG Cuti Hari Ulang Tahun Pertabalan Sultan Terengganu
|
||||
OMIT 26 April MSG Hari Keputeraan Sultan Terengganu
|
||||
REM 26 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 26))==0 || wkdaynum(date($Ty, 4, 26))==6] MSG Cuti Hari Keputeraan Sultan Terengganu
|
||||
REM 26 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 26)), 0, 6)] MSG Cuti Hari Keputeraan Sultan Terengganu
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT 30 May MSG Pesta Kaamatan
|
||||
OMIT 31 May MSG Pesta Kaamatan
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT 1 June MSG Perayaan Hari Gawai Dayak
|
||||
REM 1 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 1))==0 || wkdaynum(date($Ty, 6, 1))==6] MSG Cuti Perayaan Hari Gawai Dayak
|
||||
REM 1 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 1)), 0, 6)] MSG Cuti Perayaan Hari Gawai Dayak
|
||||
OMIT 2 June MSG Perayaan Hari Gawai Dayak
|
||||
REM 2 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 2))==0 || wkdaynum(date($Ty, 6, 2))==6] MSG Cuti Perayaan Hari Gawai Dayak
|
||||
REM 2 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 2)), 0, 6)] MSG Cuti Perayaan Hari Gawai Dayak
|
||||
OMIT 22 July MSG Hari Kemerdekaan Sarawak
|
||||
REM 22 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 7, 22))==0 || wkdaynum(date($Ty, 7, 22))==6] MSG Cuti Hari Kemerdekaan Sarawak
|
||||
REM 22 July OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 7, 22)), 0, 6)] MSG Cuti Hari Kemerdekaan Sarawak
|
||||
REM Second Saturday in October ADDOMIT SCANFROM -28 MSG Hari Jadi Yang di-Pertua Negeri Sarawak
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 1 February MSG Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 1))==0 || wkdaynum(date($Ty, 2, 1))==6] MSG Cuti Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 1)), 0, 6)] MSG Cuti Hari Wilayah Persekutuan
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 1 February MSG Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 1))==0 || wkdaynum(date($Ty, 2, 1))==6] MSG Cuti Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 1)), 0, 6)] MSG Cuti Hari Wilayah Persekutuan
|
||||
OMIT 30 May MSG Pesta Kaamatan
|
||||
OMIT 31 May MSG Pesta Kaamatan
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# also SYSINCLUDE holidays/my.rem
|
||||
|
||||
OMIT 1 January MSG Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Cuti Tahun Baharu
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Cuti Tahun Baharu
|
||||
OMIT 1 February MSG Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 1))==0 || wkdaynum(date($Ty, 2, 1))==6] MSG Cuti Hari Wilayah Persekutuan
|
||||
REM 1 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 1)), 0, 6)] MSG Cuti Hari Wilayah Persekutuan
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG New Year's Day
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG New Year's Day (observed)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG New Year's Day (observed)
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT [easterdate($Uy)+1] MSG Easter Monday
|
||||
OMIT 1 May MSG Workers' Day
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Workers' Day (observed)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Workers' Day (observed)
|
||||
OMIT 12 June MSG Democracy Day
|
||||
REM 12 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 6, 12))==0 || wkdaynum(date($Ty, 6, 12))==6] MSG Democracy Day (observed)
|
||||
REM 12 June OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 6, 12)), 0, 6)] MSG Democracy Day (observed)
|
||||
OMIT 1 October MSG Independence Day
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 1))==0 || wkdaynum(date($Ty, 10, 1))==6] MSG Independence Day (observed)
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 1)), 0, 6)] MSG Independence Day (observed)
|
||||
OMIT 25 December MSG Christmas Day
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Christmas Day (observed)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Christmas Day (observed)
|
||||
OMIT 26 December MSG Boxing Day
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 26))==0 || wkdaynum(date($Ty, 12, 26))==6] MSG Boxing Day (observed)
|
||||
REM 26 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 26)), 0, 6)] MSG Boxing Day (observed)
|
||||
|
||||
@@ -20,7 +20,6 @@ OMIT 26 December MSG Tweede Kerstdag
|
||||
|
||||
# Optional holidays
|
||||
REM [easterdate($Uy)-2] MSG Goede Vrijdag
|
||||
|
||||
# Bevrijdingsdag is a holiday every 5th year.
|
||||
# Hence the two reminders below
|
||||
REM 5 May SATISFY [$Ty % 5 != 0] MSG Bevrijdingsdag
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG New Year's Day
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG New Year's Day (observed)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG New Year's Day (observed)
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT 1 May MSG Labour Day
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Labour Day (observed)
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Labour Day (observed)
|
||||
OMIT 9 August MSG National Day
|
||||
REM 9 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 8, 9))==0 || wkdaynum(date($Ty, 8, 9))==6] MSG National Day (observed)
|
||||
REM 9 August OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 8, 9)), 0, 6)] MSG National Day (observed)
|
||||
OMIT 25 December MSG Christmas Day
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 25))==0 || wkdaynum(date($Ty, 12, 25))==6] MSG Christmas Day (observed)
|
||||
REM 25 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 25)), 0, 6)] MSG Christmas Day (observed)
|
||||
|
||||
@@ -15,7 +15,7 @@ OMIT 6 April MSG วันจักรี
|
||||
REM 7 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 6)) == 0] MSG ชดเชยวันจักรี
|
||||
REM 8 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 6)) == 6] MSG ชดเชยวันจักรี
|
||||
OMIT 13 April MSG วันสงกรานต์
|
||||
REM 13 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 13))==0 || wkdaynum(date($Ty, 4, 13))==6] MSG ชดเชยวันสงกรานต์
|
||||
REM 13 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 13)), 0, 6)] MSG ชดเชยวันสงกรานต์
|
||||
OMIT 14 April MSG วันสงกรานต์
|
||||
OMIT 15 April MSG วันสงกรานต์
|
||||
OMIT 1 May MSG วันแรงงานแห่งชาติ
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG 中華民國開國紀念日
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG 中華民國開國紀念日(慶祝)
|
||||
REM 1 January OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG 中華民國開國紀念日(慶祝)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG 中華民國開國紀念日(慶祝)
|
||||
REM 1 January OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG 中華民國開國紀念日(慶祝)
|
||||
OMIT 28 February MSG 和平紀念日
|
||||
REM 28 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 28))==0 || wkdaynum(date($Ty, 2, 28))==6] MSG 和平紀念日(慶祝)
|
||||
REM 28 February OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 2, 28))==0 || wkdaynum(date($Ty, 2, 28))==6] MSG 和平紀念日(慶祝)
|
||||
REM 28 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 28)), 0, 6)] MSG 和平紀念日(慶祝)
|
||||
REM 28 February OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 28)), 0, 6)] MSG 和平紀念日(慶祝)
|
||||
REM 2 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 0] MSG 兒童節(慶祝)
|
||||
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 2] MSG 兒童節(慶祝)
|
||||
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 3] MSG 兒童節(慶祝)
|
||||
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 5] MSG 兒童節(慶祝)
|
||||
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 6] MSG 兒童節(慶祝)
|
||||
OMIT 4 April MSG 兒童節
|
||||
REM 4 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4))==0 || wkdaynum(date($Ty, 4, 4))==6] MSG 清明節(慶祝)
|
||||
REM 4 April OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4))==0 || wkdaynum(date($Ty, 4, 4))==6] MSG 清明節(慶祝)
|
||||
REM 4 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 4)), 0, 6)] MSG 清明節(慶祝)
|
||||
REM 4 April OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 4)), 0, 6)] MSG 清明節(慶祝)
|
||||
REM 5 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 1] MSG 兒童節(慶祝)
|
||||
REM 5 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 4)) == 4] MSG 兒童節(慶祝)
|
||||
OMIT 10 October MSG 中華民國國慶日
|
||||
REM 10 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 10))==0 || wkdaynum(date($Ty, 10, 10))==6] MSG 中華民國國慶日(慶祝)
|
||||
REM 10 October OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 10))==0 || wkdaynum(date($Ty, 10, 10))==6] MSG 中華民國國慶日(慶祝)
|
||||
REM 10 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 10)), 0, 6)] MSG 中華民國國慶日(慶祝)
|
||||
REM 10 October OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 10)), 0, 6)] MSG 中華民國國慶日(慶祝)
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
REM Fourth Monday in April ADDOMIT SCANFROM -28 MSG State Holiday
|
||||
REM Second Monday in October ADDOMIT SCANFROM -28 MSG Columbus Day
|
||||
REM Friday 23 November ADDOMIT SCANFROM -28 MSG State Holiday
|
||||
REM 23 December ADDOMIT SCANFROM -28 SATISFY [$TW == 4 || $Tw == 5] MSG Washington's Birthday
|
||||
REM 24 December ADDOMIT SCANFROM -28 SATISFY [$Tw == 1 || $Tw == 2 || $Tw == 4] MSG Washington's Birthday
|
||||
REM 26 December ADDOMIT SCANFROM -28 SATISFY [$Tw == 2 || $Tw == 5] MSG Washington's Birthday
|
||||
REM 23 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 5, 4)] MSG Washington's Birthday
|
||||
REM 24 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 1, 2, 4)] MSG Washington's Birthday
|
||||
REM 26 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 2, 5)] MSG Washington's Birthday
|
||||
|
||||
@@ -14,6 +14,6 @@ OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
REM Tuesday 2 May ADDOMIT SCANFROM -28 MSG Primary Election Day
|
||||
REM Second Monday in October ADDOMIT SCANFROM -28 MSG Columbus Day
|
||||
REM Friday 23 November ADDOMIT SCANFROM -28 MSG Lincoln's Birthday
|
||||
REM 23 December ADDOMIT SCANFROM -28 SATISFY [$TW == 4 || $Tw == 5] MSG Washington's Birthday
|
||||
REM 24 December ADDOMIT SCANFROM -28 SATISFY [$Tw == 1 || $Tw == 2 || $Tw == 4] MSG Washington's Birthday
|
||||
REM 26 December ADDOMIT SCANFROM -28 SATISFY [$Tw == 2 || $Tw == 5] MSG Washington's Birthday
|
||||
REM 23 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 5, 4)] MSG Washington's Birthday
|
||||
REM 24 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 1, 2, 4)] MSG Washington's Birthday
|
||||
REM 26 December ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 2, 5)] MSG Washington's Birthday
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Yangi yil
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Yangi yil (ko‘chirilgan)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Yangi yil (ko‘chirilgan)
|
||||
OMIT 8 March MSG Xotin-qizlar kuni
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 8))==0 || wkdaynum(date($Ty, 3, 8))==6] MSG Xotin-qizlar kuni (ko‘chirilgan)
|
||||
REM 8 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 8)), 0, 6)] MSG Xotin-qizlar kuni (ko‘chirilgan)
|
||||
OMIT 21 March MSG Navro‘z bayrami
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 3, 21))==0 || wkdaynum(date($Ty, 3, 21))==6] MSG Navro‘z bayrami (ko‘chirilgan)
|
||||
REM 21 March OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 3, 21)), 0, 6)] MSG Navro‘z bayrami (ko‘chirilgan)
|
||||
OMIT 9 May MSG Xotira va qadrlash kuni
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 9))==0 || wkdaynum(date($Ty, 5, 9))==6] MSG Xotira va qadrlash kuni (ko‘chirilgan)
|
||||
REM 9 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 9)), 0, 6)] MSG Xotira va qadrlash kuni (ko‘chirilgan)
|
||||
OMIT 1 September MSG Mustaqillik kuni
|
||||
REM 1 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 9, 1))==0 || wkdaynum(date($Ty, 9, 1))==6] MSG Mustaqillik kuni (ko‘chirilgan)
|
||||
REM 1 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 9, 1)), 0, 6)] MSG Mustaqillik kuni (ko‘chirilgan)
|
||||
OMIT 1 October MSG O‘qituvchi va murabbiylar kuni
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 10, 1))==0 || wkdaynum(date($Ty, 10, 1))==6] MSG O‘qituvchi va murabbiylar kuni (ko‘chirilgan)
|
||||
REM 1 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 1)), 0, 6)] MSG O‘qituvchi va murabbiylar kuni (ko‘chirilgan)
|
||||
OMIT 8 December MSG O‘zbekiston Respublikasi Konstitutsiyasi kuni
|
||||
REM 8 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 12, 8))==0 || wkdaynum(date($Ty, 12, 8))==6] MSG O‘zbekiston Respublikasi Konstitutsiyasi kuni (ko‘chirilgan)
|
||||
REM 8 December OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 12, 8)), 0, 6)] MSG O‘zbekiston Respublikasi Konstitutsiyasi kuni (ko‘chirilgan)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
# See important caveats in the README file in this directory.
|
||||
|
||||
OMIT 1 January MSG Tết Dương lịch
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 1, 1))==0 || wkdaynum(date($Ty, 1, 1))==6] MSG Tết Dương lịch (nghỉ bù)
|
||||
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG Tết Dương lịch (nghỉ bù)
|
||||
OMIT 30 April MSG Ngày Chiến thắng
|
||||
REM 30 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 4, 30))==0 || wkdaynum(date($Ty, 4, 30))==6] MSG Ngày Chiến thắng (nghỉ bù)
|
||||
REM 30 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 30)), 0, 6)] MSG Ngày Chiến thắng (nghỉ bù)
|
||||
OMIT 1 May MSG Ngày Quốc tế Lao động
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 5, 1))==0 || wkdaynum(date($Ty, 5, 1))==6] MSG Ngày Quốc tế Lao động (nghỉ bù)
|
||||
REM 1 September ADDOMIT SCANFROM -28 SATISFY [$Tw == 1 || $Tw == 2 || $Tw == 4 || $Tw == 5] MSG Quốc khánh
|
||||
REM 1 May OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 5, 1)), 0, 6)] MSG Ngày Quốc tế Lao động (nghỉ bù)
|
||||
REM 1 September ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 1, 2, 4, 5)] MSG Quốc khánh
|
||||
OMIT 2 September MSG Quốc khánh
|
||||
REM 2 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [wkdaynum(date($Ty, 9, 2))==0 || wkdaynum(date($Ty, 9, 2))==6] MSG Quốc khánh (nghỉ bù)
|
||||
REM 3 September ADDOMIT SCANFROM -28 SATISFY [$Tw == 2 || $Tw == 5 || $Tw == 1] MSG Quốc khánh
|
||||
REM 2 September OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 9, 2)), 0, 6)] MSG Quốc khánh (nghỉ bù)
|
||||
REM 3 September ADDOMIT SCANFROM -28 SATISFY [isany($Tw, 2, 5, 1)] MSG Quốc khánh
|
||||
|
||||
5
include/utils/add-html-anchors.rem
Normal file
5
include/utils/add-html-anchors.rem
Normal file
@@ -0,0 +1,5 @@
|
||||
# Add HTML anchors to each day box.
|
||||
# This adds anchors: <a id="YYYY-MM-DD" name="YYYY-MM-DD"></a>
|
||||
# to each calendar box in an HTML calendar.
|
||||
|
||||
REM SPECIAL HTML <a id="[$T]" name="[$T]"></a>
|
||||
107
man/remind.1.in
107
man/remind.1.in
@@ -300,7 +300,7 @@ standard error stream) to the standard output stream.
|
||||
.B \-d\fR\fIchars\fR
|
||||
The \fB-d\fR option enables certain debugging modes. The \fIchars\fR
|
||||
specify which modes to enable:
|
||||
.RS 2
|
||||
.RS
|
||||
.TP
|
||||
.B e
|
||||
Echo all input lines
|
||||
@@ -328,6 +328,26 @@ tree. This is unlikely to be useful unless you are working on
|
||||
.B h
|
||||
Dump hash-table statistics on exit.
|
||||
.TP
|
||||
.B u
|
||||
When \fBRemind\fR exits, print a list of variables that were SET, but
|
||||
not subsequently used.
|
||||
.RS
|
||||
.PP
|
||||
Note that the \fBu\fR debugging flag may produce spurious warnings. For
|
||||
example, this sequence of commands:
|
||||
.PP
|
||||
.nf
|
||||
DEBUG +u
|
||||
SET a 1
|
||||
IFTRIG Wed
|
||||
MSG a = [a]
|
||||
ENDIF
|
||||
.fi
|
||||
.PP
|
||||
will issue a warning about \fBa\fR being unused unless it is run on a
|
||||
Wednesday.
|
||||
.RE
|
||||
.TP
|
||||
.B n
|
||||
Print debugging information about why \fBRemind\fR considers an expression
|
||||
to be "non-constant"
|
||||
@@ -3038,7 +3058,7 @@ Equivalent to \fBday(trigdate())\fR.
|
||||
.B $Tm (read-only)
|
||||
Equivalent to \fBmonnum(trigdate())\fR.
|
||||
.TP
|
||||
.B $Tu (read-only)
|
||||
.B $Tu (read-only, DATE type)
|
||||
Equivalent to \fBtriguntil()\fR.
|
||||
.TP
|
||||
.B $Tw (read-only)
|
||||
@@ -3400,15 +3420,22 @@ characters occupy two columns. \fBcolumns(str)\fR takes all of that
|
||||
into account. Note that if \fBRemind\fR was compiled without Unicode support,
|
||||
\fBcolumns(str)\fR returns a type mismatch error.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B const(x_arg)
|
||||
Evaluates \fIarg\fR and returns it, but also ensures that the result
|
||||
is marked "constant". Use with caution; incorrect use could result
|
||||
in unwanted reminders being purged in Purge Mode. See also the section
|
||||
"NON-CONSTANT EXPRESSIONS"
|
||||
.TP
|
||||
.B current()
|
||||
Returns the current date and time as a DATETIME object. This may be the
|
||||
actual date and time, or may be the date and time supplied on the command line.
|
||||
.TP
|
||||
.B date(i_y, i_m, i_d)
|
||||
.B date(i_y, si_m, i_d)
|
||||
The \fBdate()\fR function returns a \fBDATE\fR object with the year,
|
||||
month and day components specified by \fIy\fR, \fIm\fR and \fId\fR.
|
||||
The month can be specified as an integer from 1 to 12, or a string
|
||||
that is the name of a month.
|
||||
.TP
|
||||
.B datepart(dq_datetime)
|
||||
Returns a \fBDATE\fR object representing the date portion of
|
||||
@@ -3425,11 +3452,13 @@ If you supply three arguments, the first
|
||||
must be a DATE and the second and third must be INTs. The second and
|
||||
third arguments are interpreted as hours and minutes and converted to a TIME.
|
||||
.PP
|
||||
If you supply four arguments, the first three must be INTs, interpreted
|
||||
as the year, month and day. The fourth argument must be a TIME.
|
||||
If you supply four arguments, they are interpreted as year, month, day
|
||||
and time. Year and day must be INTs. Month may be an INT from 0 to 12
|
||||
or a string naming a month. Time must be a TIME.
|
||||
.PP
|
||||
Finally, if you supply five arguments, they must all be INTs and are
|
||||
interpreted as year, month, day, hour and minute.
|
||||
interpreted as year, month, day, hour and minute. (Actually, month
|
||||
can also be a string that is the name of a month.)
|
||||
.RE
|
||||
.TP
|
||||
.B dawn([dq_date])
|
||||
@@ -3442,8 +3471,12 @@ This function takes a \fBDATE\fR or \fBDATETIME\fR as an argument, and
|
||||
returns an \fBINT\fR that is the day-of-month component of
|
||||
\fIdate\fR.
|
||||
.TP
|
||||
.B daysinmon(i_m, i_y)
|
||||
Returns the number of days in month \fIm\fR (1-12) of the year \fIy\fR.
|
||||
.B daysinmon(si_m, i_y)\fR or \fB daysinmon(dq_date)\fR
|
||||
Returns the number of days in month \fIm\fR (1-12) of the year
|
||||
\fIy\fR. The first argument can either be an integer from 1 to 12, or
|
||||
a string that is the name of a month. If given a single DATE or
|
||||
DATETIME argument, returns the number of days in the month containing
|
||||
the argument.
|
||||
.TP
|
||||
.B defined(s_var)
|
||||
Returns 1 if the variable named by \fIvar\fR is defined, or 0 if it is not.
|
||||
@@ -3534,6 +3567,10 @@ The result will be "F is 12" because the reference to \fIx\fR inside the
|
||||
\fBeval()\fR argument refers to the \fIglobal\fR variable \fIx\fR and
|
||||
not the function argument.
|
||||
.PP
|
||||
Note that for safety, \fBRUN\fR is disabled during the evaluation of
|
||||
\fBeval()\fR, which means you can't use the \fBshell()\fR function from
|
||||
within an \fBeval()\fR.
|
||||
.PP
|
||||
.RE
|
||||
.TP
|
||||
.B evaltrig(s_trigger [,dq_start])
|
||||
@@ -3745,10 +3782,20 @@ functions. It is available starting with version 03.00.07 of \fBRemind\fR.
|
||||
.B minute(tq_time)
|
||||
Returns the minute component of \fItime\fR.
|
||||
.TP
|
||||
.B mon(dqi_arg)
|
||||
.B mon(dqis_arg)
|
||||
If \fIarg\fR is of \fBDATE\fR or \fBDATETIME\fR type, returns a string
|
||||
that names the month component of the date. If \fIarg\fR is an
|
||||
\fBINT\fR from 1 to 12, returns a string that names the month.
|
||||
\fBINT\fR from 1 to 12, returns a string that names the month. If \fIarg\fR
|
||||
is a \fBSTRING\fR, returns the name of the month. This last case might
|
||||
sound silly, but for example:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
mon("Mar")
|
||||
.fi
|
||||
.PP
|
||||
will return "March", the full name of the month.
|
||||
.RE
|
||||
.TP
|
||||
.B monnum(dq_date)\fR or \fBmonnum(s_str)\fR
|
||||
Returns an \fBINT\fR from 1 to 12, representing the month component of
|
||||
@@ -4566,7 +4613,9 @@ an error results.
|
||||
.PP
|
||||
However, if you supply a second argument, it is returned if the \fIvarname\fR
|
||||
is not defined. The expression value("XY", 0) will return 0 if XY is not
|
||||
defined, and the value of XY if it is defined.
|
||||
defined, and the value of XY if it is defined. Note that \fBvalue\fR
|
||||
evaluates the second argument lazily; it is \fInot\fR evaluated if
|
||||
\fIvarname\fR is defined.
|
||||
.RE
|
||||
.TP
|
||||
.B version()
|
||||
@@ -5045,7 +5094,18 @@ function, the command fails with an error message and does nothing.
|
||||
If you define a user-defined function and then later on redefine it,
|
||||
\fBRemind\fR will issue a warning. If you do not want this warning,
|
||||
then use \fBFUNSET\fR to remove the existing definition before you
|
||||
redefine the function.
|
||||
redefine the function. Alternatively, you can use a "-" token before
|
||||
the function name to suppress "redefined function" warnings, as in the
|
||||
following example:
|
||||
.PP
|
||||
.nf
|
||||
FSET - f(x) 2*x
|
||||
# You must have space before and after the "-"
|
||||
# This will NOT work:
|
||||
# FSET -f(x) 2*x
|
||||
.fi
|
||||
.PP
|
||||
to define a function and suppress any "redefined function" warning.
|
||||
.PP
|
||||
.SH PRECISE SCHEDULING
|
||||
.PP
|
||||
@@ -5335,7 +5395,7 @@ under program control. The format is:
|
||||
.PP
|
||||
\fBDEBUG\fR [+\fIflagson\fR] [\-\fIflagsoff\fR]
|
||||
.PP
|
||||
\fIFlagson\fR and \fIflagsoff\fR consist of strings of the characters "shextvlfqn"
|
||||
\fIFlagson\fR and \fIflagsoff\fR consist of strings of the characters "shextvlfqnu"
|
||||
that correspond to the debugging options discussed in the command-line
|
||||
options section. If preceded with a "+", the corresponding group of
|
||||
debugging options is switched on. Otherwise, they are switched off.
|
||||
@@ -5810,7 +5870,13 @@ Here are some examples that should make things clear:
|
||||
.PP
|
||||
Note that within the \fBIF\fR...\fBENDIF\fR scope, any assignments
|
||||
are non-constant because the code flow depends on today's date, which
|
||||
could change in subsequent \fBRemind\fR runs.
|
||||
could change in subsequent \fBRemind\fR runs. If you want to force
|
||||
a variable to be treated as constant, no matter what, then use the following
|
||||
just before you use the variable:
|
||||
.PP
|
||||
.nf
|
||||
SET var const(var)
|
||||
.fi
|
||||
.PP
|
||||
Variables initialized on the command-line with the \fB\-i\fR flag are
|
||||
\fIalways\fR considered to be non-constant.
|
||||
@@ -6725,12 +6791,13 @@ date of the scanning\fR that
|
||||
satisfies the trigger. In addition, there is one special case in which
|
||||
\fBtrigvalid()\fR returns 1 and \fBtrigdate()\fR returns a meaningful result:
|
||||
.PP
|
||||
If the \fBREM\fR or \fBIFTRIG\fR command did not contain an \fBUNTIL\fR
|
||||
clause, and contained all of the \fIday\fR, \fImonth\fR and \fIyear\fR
|
||||
components, then \fBRemind\fR will correctly compute a trigger date, even
|
||||
if it happens to be before the start of scanning.
|
||||
Note that this behaviour is not true for
|
||||
If the \fBREM\fR or \fBIFTRIG\fR command did not contain an
|
||||
\fBUNTIL\fR or \fBSATISFY\fR clause, and contained all of the
|
||||
\fIday\fR, \fImonth\fR and \fIyear\fR components, then \fBRemind\fR
|
||||
will correctly compute a trigger date, even if it happens to be before
|
||||
the start of scanning. Note that this behaviour is not true for
|
||||
versions of \fBRemind\fR prior to 03.00.01.
|
||||
|
||||
.SH FILES
|
||||
.PP
|
||||
The traditional location of your reminders file or directory is:
|
||||
|
||||
@@ -4,7 +4,7 @@ REM2HTML
|
||||
rem2html is a Perl script that transforms the output of `remind -pp
|
||||
...' to HTML. Type `perl rem2html --help' for usage information.
|
||||
|
||||
rem2html requires the Perl modules `JSON::Any' and `Getopt::Long'. It
|
||||
rem2html requires the Perl modules `JSON::MaybeXS' and `Getopt::Long'. It
|
||||
will not be installed unless you have those modules as well as Perl
|
||||
itself.
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@ while(1) {
|
||||
}
|
||||
my ($obj, $err) = Remind::PDF->create_from_stream(*STDIN,
|
||||
{color => 1,
|
||||
colour => 1,
|
||||
shade => 1,
|
||||
moon => 1,
|
||||
pango => 1,
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct cal_entry {
|
||||
DynamicBuffer tags;
|
||||
char passthru[PASSTHRU_LEN+1];
|
||||
int duration;
|
||||
char *filename;
|
||||
char const *filename;
|
||||
int lineno;
|
||||
int lineno_start;
|
||||
Trigger trig;
|
||||
@@ -757,7 +757,7 @@ InitMoonsAndShades(void)
|
||||
static void
|
||||
SetShadeEntry(int dse, char const *shade)
|
||||
{
|
||||
int y, m, d;
|
||||
int d;
|
||||
int r, g, b;
|
||||
/* Don't bother if we're not doing SHADE specials */
|
||||
if (!UseBGVTColors) {
|
||||
@@ -774,7 +774,7 @@ SetShadeEntry(int dse, char const *shade)
|
||||
if (r < 0 || g < 0 || b < 0 || r > 255 || g > 255 || b > 255) {
|
||||
return;
|
||||
}
|
||||
FromDSE(dse, &y, &m, &d);
|
||||
FromDSE(dse, NULL, NULL, &d);
|
||||
bgcolor[d][0] = r;
|
||||
bgcolor[d][1] = g;
|
||||
bgcolor[d][2] = b;
|
||||
@@ -784,7 +784,7 @@ static void
|
||||
SetMoonEntry(int dse, char const *moon)
|
||||
{
|
||||
int phase;
|
||||
int y, m, d;
|
||||
int d;
|
||||
char msg[28];
|
||||
|
||||
/* Don't bother unless it's utf-8 */
|
||||
@@ -803,7 +803,7 @@ SetMoonEntry(int dse, char const *moon)
|
||||
/* Bad phase */
|
||||
return;
|
||||
}
|
||||
FromDSE(dse, &y, &m, &d);
|
||||
FromDSE(dse, NULL, NULL, &d);
|
||||
if (msg[0]) {
|
||||
snprintf(moons[d], sizeof(moons[d]), "%s %s", moonphase_emojis[phase], msg);
|
||||
} else {
|
||||
@@ -1476,13 +1476,13 @@ static void PrintCentered(char const *s, int width, char *pad)
|
||||
static int WriteOneCalLine(int start_dse, int wd)
|
||||
{
|
||||
int done = 1, i;
|
||||
int y, m, d;
|
||||
int d;
|
||||
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
FromDSE(start_dse+i, &y, &m, &d);
|
||||
FromDSE(start_dse+i, NULL, NULL, &d);
|
||||
d -= wd;
|
||||
if (CalColumn[i]) {
|
||||
Backgroundize(ColToDay[i]);
|
||||
@@ -1539,7 +1539,6 @@ static int WriteOneColLine(int col)
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->raw_text);
|
||||
free(e->filename);
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
FreeTrigInfoChain(e->infos);
|
||||
free(e);
|
||||
@@ -1626,7 +1625,6 @@ static int WriteOneColLine(int col)
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->raw_text);
|
||||
free(e->filename);
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
FreeTrigInfoChain(e->infos);
|
||||
free(e);
|
||||
@@ -1645,7 +1643,6 @@ static int WriteOneColLine(int col)
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->filename);
|
||||
#ifdef REM_USE_WCHAR
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
#endif
|
||||
@@ -1708,7 +1705,6 @@ static int WriteOneColLine(int col)
|
||||
if (!*s && !e->next) {
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->filename);
|
||||
#ifdef REM_USE_WCHAR
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
#endif
|
||||
@@ -2317,17 +2313,7 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
FreeTrig(&trig);
|
||||
e->duration = tim.duration;
|
||||
e->priority = trig.priority;
|
||||
e->filename = StrDup(FileName);
|
||||
if(!e->filename) {
|
||||
FreeTrigInfoChain(e->infos);
|
||||
if (e->text) free(e->text);
|
||||
if (e->raw_text) free(e->raw_text);
|
||||
#ifdef REM_USE_WCHAR
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
#endif
|
||||
free(e);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
e->filename = GetCurrentFilename();
|
||||
e->lineno = LineNo;
|
||||
e->lineno_start = LineNoStart;
|
||||
|
||||
@@ -2673,7 +2659,6 @@ static void WriteSimpleEntries(int col, int dse)
|
||||
|
||||
free(e->text);
|
||||
free(e->raw_text);
|
||||
free(e->filename);
|
||||
FreeTrigInfoChain(e->infos);
|
||||
#ifdef REM_USE_WCHAR
|
||||
if (e->wc_text) free(e->wc_text);
|
||||
|
||||
@@ -1554,6 +1554,8 @@ int DoSatRemind(Trigger *trig, TimeTrig *tt, ParsePtr p)
|
||||
}
|
||||
if (dse == -1) {
|
||||
free_expr_tree(sat_node);
|
||||
LastTrigValid = 0;
|
||||
LastTriggerDate = -1;
|
||||
return E_EXPIRED;
|
||||
}
|
||||
r = evaluate_expression(sat_node, NULL, &v, &nonconst);
|
||||
@@ -1572,7 +1574,7 @@ int DoSatRemind(Trigger *trig, TimeTrig *tt, ParsePtr p)
|
||||
int y, m, d;
|
||||
FromDSE(LastTriggerDate, &y, &m, &d);
|
||||
fprintf(ErrFp, "%s(%s): Trig(satisfied) = %s, %d %s, %d",
|
||||
FileName, line_range(LineNoStart, LineNo),
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo),
|
||||
get_day_name(LastTriggerDate % 7),
|
||||
d,
|
||||
get_month_name(m),
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
#define E_MISS_END 1
|
||||
#define E_MISS_QUOTE 2
|
||||
#define E_OP_STK_OVER 3
|
||||
/* #define E_VA_STK_OVER 4 */
|
||||
#define E_CANT_PARSE_MONTH 4
|
||||
#define E_MISS_RIGHT_PAREN 5
|
||||
#define E_UNDEF_FUNC 6
|
||||
#define E_ILLEGAL_CHAR 7
|
||||
/* #define E_EXPECTING_BINOP 8 */
|
||||
#define E_CANT_PARSE_WKDAY 8
|
||||
#define E_NO_MEM 9
|
||||
#define E_BAD_NUMBER 10
|
||||
/* #define E_OP_STK_UNDER 11 */
|
||||
@@ -151,11 +151,11 @@ EXTERN char *ErrMsg[]
|
||||
/* E_MISS_END */ "Missing ']'",
|
||||
/* E_MISS_QUOTE */ "Missing quote",
|
||||
/* E_OP_STK_OVER */ "Expression too complex",
|
||||
/* E_VA_STK_OVER */ "",
|
||||
/* E_CANT_PARSE_MONTH */ "Invalid month name",
|
||||
/* E_MISS_RIGHT_PAREN */ "Missing ')'",
|
||||
/* E_UNDEF_FUNC */ "Undefined function",
|
||||
/* E_ILLEGAL_CHAR */ "Illegal character",
|
||||
/* E_EXPECTING_BINOP */ "Expecting binary operator",
|
||||
/* E_CANT_PARSE_WKDAY*/ "Invalid weekday name",
|
||||
/* E_NO_MEM */ "Out of memory",
|
||||
/* E_BAD_NUMBER */ "Ill-formed number",
|
||||
/* E_OP_STK_UNDER */ "",
|
||||
|
||||
10
src/expr.c
10
src/expr.c
@@ -425,7 +425,8 @@ get_var(expr_node *node, Value *ans, int *nonconst)
|
||||
Eprint("%s: `%s'", GetErr(E_NOSUCH_VAR), str);
|
||||
return E_NOSUCH_VAR;
|
||||
}
|
||||
if (v->nonconstant) {
|
||||
v->used_since_set = 1;
|
||||
if (!v->is_constant) {
|
||||
nonconst_debug(*nonconst, tr("Global variable `%s' makes expression non-constant"), str);
|
||||
*nonconst = 1;
|
||||
}
|
||||
@@ -568,6 +569,13 @@ eval_builtin(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
/* All went well; copy the result destructively */
|
||||
(*ans) = info.retval;
|
||||
|
||||
/* Special case of const cunction */
|
||||
if (!strcmp(f->name, "const")) {
|
||||
if (*nonconst) {
|
||||
nonconst_debug(0, tr("Non-constant expression converted to constant by `const' built-in function"));
|
||||
}
|
||||
*nonconst = 0;
|
||||
}
|
||||
/* Don't allow retval to be destroyed! */
|
||||
info.retval.type = ERR_TYPE;
|
||||
}
|
||||
|
||||
98
src/files.c
98
src/files.c
@@ -20,6 +20,7 @@
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef TM_IN_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
@@ -85,10 +86,21 @@ typedef struct {
|
||||
int ownedByMe;
|
||||
} IncludeStruct;
|
||||
|
||||
typedef struct fn_entry {
|
||||
struct hash_link link;
|
||||
char const *fname;
|
||||
} FilenameHashEntry;
|
||||
|
||||
/* A hash table to hold unique copies of all the filenames we process */
|
||||
static hash_table FilenameHashTable;
|
||||
|
||||
static CachedFile *CachedFiles = (CachedFile *) NULL;
|
||||
static CachedLine *CLine = (CachedLine *) NULL;
|
||||
static DirectoryFilenameChain *CachedDirectoryChains = NULL;
|
||||
|
||||
/* Current filename */
|
||||
static char const *FileName = NULL;
|
||||
|
||||
static FILE *fp;
|
||||
|
||||
static IncludeStruct IStack[INCLUDE_NEST];
|
||||
@@ -102,6 +114,64 @@ static int CheckSafetyAux (struct stat *statbuf);
|
||||
static int PopFile (void);
|
||||
static int IncludeCmd(char const *);
|
||||
|
||||
static unsigned int FnHashFunc(void *x)
|
||||
{
|
||||
FilenameHashEntry *e = (FilenameHashEntry *) x;
|
||||
return HashVal_preservecase(e->fname);
|
||||
}
|
||||
|
||||
static int FnCompareFunc(void *a, void *b)
|
||||
{
|
||||
FilenameHashEntry *e1 = (FilenameHashEntry *) a;
|
||||
FilenameHashEntry *e2 = (FilenameHashEntry *) b;
|
||||
return strcmp(e1->fname, e2->fname);
|
||||
}
|
||||
|
||||
void InitFiles(void)
|
||||
{
|
||||
if (hash_table_init(&FilenameHashTable, offsetof(FilenameHashEntry, link),
|
||||
FnHashFunc, FnCompareFunc) < 0) {
|
||||
fprintf(ErrFp, "Unable to initialize filename hash table: Out of memory. Exiting.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void SetCurrentFilename(char const *fname)
|
||||
{
|
||||
FilenameHashEntry *e;
|
||||
FilenameHashEntry candidate;
|
||||
candidate.fname = fname;
|
||||
|
||||
e = (FilenameHashEntry *) hash_table_find(&FilenameHashTable, &candidate);
|
||||
if (!e) {
|
||||
e = NEW(FilenameHashEntry);
|
||||
if (!e) {
|
||||
fprintf(ErrFp, "Out of Memory!\n");
|
||||
exit(1);
|
||||
}
|
||||
e->fname = strdup(fname);
|
||||
if (!e->fname) {
|
||||
fprintf(ErrFp, "Out of Memory!\n");
|
||||
exit(1);
|
||||
}
|
||||
hash_table_insert(&FilenameHashTable, e);
|
||||
}
|
||||
FileName = e->fname;
|
||||
}
|
||||
|
||||
char const *GetCurrentFilename(void)
|
||||
{
|
||||
if (FileName) {
|
||||
if (!strcmp(FileName, "-")) {
|
||||
return "-stdin-";
|
||||
} else {
|
||||
return FileName;
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
got_a_fresh_line(void)
|
||||
{
|
||||
@@ -332,7 +402,7 @@ int OpenFile(char const *fname)
|
||||
fprintf(ErrFp, "\n");
|
||||
}
|
||||
CLine = h->cache;
|
||||
STRSET(FileName, fname);
|
||||
SetCurrentFilename(fname);
|
||||
LineNo = 0;
|
||||
LineNoStart = 0;
|
||||
if (!h->ownedByMe) {
|
||||
@@ -387,7 +457,7 @@ int OpenFile(char const *fname)
|
||||
}
|
||||
}
|
||||
}
|
||||
STRSET(FileName, fname);
|
||||
SetCurrentFilename(fname);
|
||||
LineNo = 0;
|
||||
LineNoStart = 0;
|
||||
if (FileName) return OK; else return E_NO_MEM;
|
||||
@@ -569,7 +639,7 @@ static int PopFile(void)
|
||||
set_base_if_pointer(i->base_if_pointer);
|
||||
CLine = i->CLine;
|
||||
fp = NULL;
|
||||
STRSET(FileName, i->filename);
|
||||
SetCurrentFilename(i->filename);
|
||||
if (!i->ownedByMe) {
|
||||
RunDisabled |= RUN_NOTOWNER;
|
||||
} else {
|
||||
@@ -589,7 +659,6 @@ static int PopFile(void)
|
||||
if (fp != stdin)
|
||||
(void) fseek(fp, i->offset, 0); /* Trust that it works... */
|
||||
}
|
||||
free((char *) i->filename);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -894,15 +963,7 @@ static int IncludeCmd(char const *cmd)
|
||||
}
|
||||
fname = DBufValue(&buf);
|
||||
|
||||
if (FileName) {
|
||||
i->filename = StrDup(FileName);
|
||||
if (!i->filename) {
|
||||
DBufFree(&buf);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
} else {
|
||||
i->filename = NULL;
|
||||
}
|
||||
i->filename = FileName;
|
||||
i->ownedByMe = 1;
|
||||
i->LineNo = LineNo;
|
||||
i->LineNoStart = LineNo;
|
||||
@@ -927,7 +988,7 @@ static int IncludeCmd(char const *cmd)
|
||||
fprintf(ErrFp, "\n");
|
||||
}
|
||||
CLine = h->cache;
|
||||
STRSET(FileName, fname);
|
||||
SetCurrentFilename(fname);
|
||||
DBufFree(&buf);
|
||||
LineNo = 0;
|
||||
LineNoStart = 0;
|
||||
@@ -979,7 +1040,7 @@ static int IncludeCmd(char const *cmd)
|
||||
CLine = CachedFiles->cache;
|
||||
LineNo = 0;
|
||||
LineNoStart = 0;
|
||||
STRSET(FileName, fname);
|
||||
SetCurrentFilename(fname);
|
||||
DBufFree(&buf);
|
||||
return OK;
|
||||
}
|
||||
@@ -1008,12 +1069,7 @@ int IncludeFile(char const *fname)
|
||||
if (IStackPtr >= INCLUDE_NEST) return E_NESTED_INCLUDE;
|
||||
i = &IStack[IStackPtr];
|
||||
|
||||
if (FileName) {
|
||||
i->filename = StrDup(FileName);
|
||||
if (!i->filename) return E_NO_MEM;
|
||||
} else {
|
||||
i->filename = NULL;
|
||||
}
|
||||
i->filename = FileName;
|
||||
i->LineNo = LineNo;
|
||||
i->LineNoStart = LineNoStart;
|
||||
i->base_if_pointer = get_base_if_pointer();
|
||||
|
||||
249
src/funcs.c
249
src/funcs.c
@@ -59,7 +59,9 @@
|
||||
#define Nargs (info->nargs)
|
||||
#define RetVal (info->retval)
|
||||
|
||||
#define DBG(x) do { if (DebugFlag & DB_PRTEXPR) { x; } } while(0)
|
||||
#define DBGX (DebugFlag & DB_PRTEXPR)
|
||||
|
||||
#define DBG(x) do { if (DBGX) { x; } } while(0)
|
||||
/* Debugging helpers for "choose()", "iif(), etc. */
|
||||
#define PUT(x) DBufPuts(&DebugBuf, x)
|
||||
#define OUT() do { fprintf(ErrFp, "%s\n", DBufValue(&DebugBuf)); DBufFree(&DebugBuf); } while(0)
|
||||
@@ -193,7 +195,7 @@ static int FTypeof (func_info *);
|
||||
static int FTzconvert (func_info *);
|
||||
static int FUTCToLocal (func_info *);
|
||||
static int FUpper (func_info *);
|
||||
static int FValue (func_info *);
|
||||
static int FValue (expr_node *, Value *, Value *, int *);
|
||||
static int FVersion (func_info *);
|
||||
static int FWeekno (func_info *);
|
||||
static int FWkday (func_info *);
|
||||
@@ -229,6 +231,8 @@ static int CacheHebYear, CacheHebMon, CacheHebDay;
|
||||
#define HASDATE(x) ((x).type & DATE_TYPE)
|
||||
#define HASTIME(x) ((x).type & TIME_TYPE)
|
||||
|
||||
#define GETMON(x) get_month(&(ARG(x)))
|
||||
|
||||
/* Macro for copying a value while destroying original copy */
|
||||
#define DCOPYVAL(x, y) ( (x) = (y), (y).type = ERR_TYPE )
|
||||
|
||||
@@ -258,13 +262,14 @@ BuiltinFunc Func[] = {
|
||||
{ "choose", 2, NO_MAX, 1, NULL, FChoose }, /*NEW-STYLE*/
|
||||
{ "coerce", 2, 2, 1, FCoerce, NULL },
|
||||
{ "columns", 0, 1, 0, FColumns, NULL },
|
||||
{ "const", 1, 1, 1, FNonconst, NULL },
|
||||
{ "current", 0, 0, 0, FCurrent, NULL },
|
||||
{ "date", 3, 3, 1, FDate, NULL },
|
||||
{ "datepart", 1, 1, 1, FDatepart, NULL },
|
||||
{ "datetime", 2, 5, 1, FDateTime, NULL },
|
||||
{ "dawn", 0, 1, 0, FDawn, NULL },
|
||||
{ "day", 1, 1, 1, FDay, NULL },
|
||||
{ "daysinmon", 2, 2, 1, FDaysinmon, NULL },
|
||||
{ "daysinmon", 1, 2, 1, FDaysinmon, NULL },
|
||||
{ "defined", 1, 1, 0, FDefined, NULL },
|
||||
{ "dosubst", 1, 3, 0, FDosubst, NULL },
|
||||
{ "dusk", 0, 1, 0, FDusk, NULL },
|
||||
@@ -364,7 +369,7 @@ BuiltinFunc Func[] = {
|
||||
{ "tzconvert", 2, 3, 0, FTzconvert, NULL },
|
||||
{ "upper", 1, 1, 1, FUpper, NULL },
|
||||
{ "utctolocal", 1, 1, 1, FUTCToLocal, NULL },
|
||||
{ "value", 1, 2, 0, FValue, NULL },
|
||||
{ "value", 1, 2, 1, NULL, FValue }, /* NEW-STYLE */
|
||||
{ "version", 0, 0, 1, FVersion, NULL },
|
||||
{ "weekno", 0, 3, 0, FWeekno, NULL },
|
||||
{ "wkday", 1, 1, 1, FWkday, NULL },
|
||||
@@ -375,6 +380,26 @@ BuiltinFunc Func[] = {
|
||||
/* Need a variable here - Func[] array not really visible to outside. */
|
||||
int NumFuncs = sizeof(Func) / sizeof(BuiltinFunc) ;
|
||||
|
||||
static int get_month(Value *v)
|
||||
{
|
||||
Token tok;
|
||||
|
||||
if (v->type == INT_TYPE) {
|
||||
if (v->v.val < 1) return -E_2LOW;
|
||||
if (v->v.val > 12) return -E_2HIGH;
|
||||
return v->v.val - 1;
|
||||
}
|
||||
if (v->type == STR_TYPE) {
|
||||
FindToken(v->v.str, &tok);
|
||||
if (tok.type != T_Month) {
|
||||
return -E_CANT_PARSE_MONTH;
|
||||
}
|
||||
return tok.val;
|
||||
}
|
||||
return -E_BAD_TYPE;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* RetStrVal */
|
||||
@@ -460,29 +485,27 @@ static int FBaseyr(func_info *info)
|
||||
static int FDate(func_info *info)
|
||||
{
|
||||
int y, m, d;
|
||||
int ytemp, mtemp, dtemp;
|
||||
|
||||
/* Any arg can be a date (in which case we use the corresponding
|
||||
component) or an integer */
|
||||
if (HASDATE(ARG(0))) {
|
||||
FromDSE(DATEPART(ARG(0)), &ytemp, &mtemp, &dtemp);
|
||||
y = ytemp;
|
||||
FromDSE(DATEPART(ARG(0)), &y, NULL, NULL);
|
||||
} else {
|
||||
ASSERT_TYPE(0, INT_TYPE);
|
||||
y = ARGV(0);
|
||||
}
|
||||
|
||||
if (HASDATE(ARG(1))) {
|
||||
FromDSE(DATEPART(ARG(1)), &ytemp, &mtemp, &dtemp);
|
||||
m = mtemp;
|
||||
FromDSE(DATEPART(ARG(1)), NULL, &m, NULL);
|
||||
} else {
|
||||
ASSERT_TYPE(1, INT_TYPE);
|
||||
m = ARGV(1) - 1;
|
||||
m = GETMON(1);
|
||||
if (m < 0) {
|
||||
return -m;
|
||||
}
|
||||
}
|
||||
|
||||
if (HASDATE(ARG(2))) {
|
||||
FromDSE(DATEPART(ARG(2)), &ytemp, &mtemp, &dtemp);
|
||||
d = dtemp;
|
||||
FromDSE(DATEPART(ARG(2)), NULL, NULL, &d);
|
||||
} else {
|
||||
ASSERT_TYPE(2, INT_TYPE);
|
||||
d = ARGV(2);
|
||||
@@ -527,11 +550,11 @@ static int FDateTime(func_info *info)
|
||||
return OK;
|
||||
case 4:
|
||||
if (ARG(0).type != INT_TYPE ||
|
||||
ARG(1).type != INT_TYPE ||
|
||||
ARG(2).type != INT_TYPE ||
|
||||
ARG(3).type != TIME_TYPE) return E_BAD_TYPE;
|
||||
y = ARGV(0);
|
||||
m = ARGV(1) - 1;
|
||||
m = GETMON(1);
|
||||
if (m < 0) return -m;
|
||||
d = ARGV(2);
|
||||
|
||||
if (!DateOK(y, m, d)) return E_BAD_DATE;
|
||||
@@ -539,13 +562,13 @@ static int FDateTime(func_info *info)
|
||||
return OK;
|
||||
case 5:
|
||||
if (ARG(0).type != INT_TYPE ||
|
||||
ARG(1).type != INT_TYPE ||
|
||||
ARG(2).type != INT_TYPE ||
|
||||
ARG(3).type != INT_TYPE ||
|
||||
ARG(4).type != INT_TYPE) return E_BAD_TYPE;
|
||||
|
||||
y = ARGV(0);
|
||||
m = ARGV(1) - 1;
|
||||
m = GETMON(1);
|
||||
if (m < 0) return -m;
|
||||
d = ARGV(2);
|
||||
if (!DateOK(y, m, d)) return E_BAD_DATE;
|
||||
|
||||
@@ -756,7 +779,7 @@ static int FMonnum(func_info *info)
|
||||
/* Convert a month name to a month number */
|
||||
FindToken(ARG(0).v.str, &tok);
|
||||
if (tok.type != T_Month) {
|
||||
return E_BAD_TYPE;
|
||||
return E_CANT_PARSE_MONTH;
|
||||
}
|
||||
RetVal.type = INT_TYPE;
|
||||
RETVAL = tok.val + 1;
|
||||
@@ -808,7 +831,7 @@ static int FWkdaynum(func_info *info)
|
||||
/* Convert a day name to a day number */
|
||||
FindToken(ARG(0).v.str, &tok);
|
||||
if (tok.type != T_WkDay) {
|
||||
return E_BAD_TYPE;
|
||||
return E_CANT_PARSE_WKDAY;
|
||||
}
|
||||
RetVal.type = INT_TYPE;
|
||||
RETVAL = (tok.val + 1) % 7;
|
||||
@@ -845,12 +868,11 @@ static int FMon(func_info *info)
|
||||
char const *s;
|
||||
int y, m, d, v;
|
||||
|
||||
if (!HASDATE(ARG(0)) && ARG(0).type != INT_TYPE) return E_BAD_TYPE;
|
||||
if (!HASDATE(ARG(0)) && ARG(0).type != INT_TYPE && ARG(0).type != STR_TYPE) return E_BAD_TYPE;
|
||||
|
||||
if (ARG(0).type == INT_TYPE) {
|
||||
m = ARGV(0) - 1;
|
||||
if (m < 0) return E_2LOW;
|
||||
if (m > 11) return E_2HIGH;
|
||||
if (ARG(0).type == INT_TYPE || ARG(0).type == STR_TYPE) {
|
||||
m = GETMON(0);
|
||||
if (m < 0) return -m;
|
||||
} else {
|
||||
v = DATEPART(ARG(0));
|
||||
if (v == CacheDse)
|
||||
@@ -1298,7 +1320,7 @@ static int FIsconst(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
ans->type = INT_TYPE;
|
||||
ans->v.val = (my_nonconst ? 0 : 1);
|
||||
DBG(PUT(PrintValue(&junk, NULL)));
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT(") => ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
OUT();
|
||||
@@ -1365,7 +1387,7 @@ static int FIsAny(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
break;
|
||||
}
|
||||
DestroyValue(v);
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
while(cur->sibling) {
|
||||
cur = cur->sibling;
|
||||
PUT(", ?");
|
||||
@@ -1402,7 +1424,7 @@ static int FCatch(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
SuppressErrorOutputInCatch = old_suppress;
|
||||
|
||||
if (r == OK) {
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT(PrintValue(ans, NULL));
|
||||
PUT(", ?) => ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
@@ -1413,14 +1435,14 @@ static int FCatch(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
|
||||
/* Save the catch error */
|
||||
LastCatchError = r;
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT("*");
|
||||
PUT(GetErr(r));
|
||||
PUT("*, ");
|
||||
}
|
||||
r = evaluate_expr_node(cur->sibling, locals, ans, nonconst);
|
||||
if (r == OK) {
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT(PrintValue(ans, NULL));
|
||||
PUT(") => ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
@@ -1428,7 +1450,7 @@ static int FCatch(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
}
|
||||
return r;
|
||||
}
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT("*");
|
||||
PUT(GetErr(r));
|
||||
PUT("*) => ");
|
||||
@@ -1477,7 +1499,7 @@ static int FChoose(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
}
|
||||
DBG(PUT(PrintValue(&v, NULL)));
|
||||
if (v.type != INT_TYPE) {
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
cur = cur->sibling;
|
||||
while(cur) {
|
||||
PUT(", ?");
|
||||
@@ -1487,6 +1509,7 @@ static int FChoose(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
PUT(GetErr(E_BAD_TYPE));
|
||||
OUT();
|
||||
}
|
||||
DestroyValue(v);
|
||||
Eprint("choose(): %s", GetErr(E_BAD_TYPE));
|
||||
return E_BAD_TYPE;
|
||||
}
|
||||
@@ -1504,7 +1527,7 @@ static int FChoose(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
DBG(DBufFree(&DebugBuf));
|
||||
return r;
|
||||
}
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
PUT(", ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
cur = cur->sibling;
|
||||
@@ -1694,25 +1717,92 @@ static int FGetenv(func_info *info)
|
||||
/* it is returned if variable is undefined. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int FValue(func_info *info)
|
||||
static int FValue(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
{
|
||||
DynamicBuffer DebugBuf;
|
||||
expr_node *cur;
|
||||
int r;
|
||||
Value varname;
|
||||
Var *v;
|
||||
|
||||
ASSERT_TYPE(0, STR_TYPE);
|
||||
switch(Nargs) {
|
||||
case 1:
|
||||
return GetVarValue(ARGSTR(0), &RetVal);
|
||||
DBG(DBufInit(&DebugBuf));
|
||||
|
||||
case 2:
|
||||
v = FindVar(ARGSTR(0), 0);
|
||||
if (!v) {
|
||||
DCOPYVAL(RetVal, ARG(1));
|
||||
return OK;
|
||||
} else {
|
||||
return CopyValue(&RetVal, &v->v);
|
||||
cur = node->child;
|
||||
r = evaluate_expr_node(cur, locals, &varname, nonconst);
|
||||
if (r != OK) {
|
||||
DBG(DBufFree(&DebugBuf));
|
||||
return r;
|
||||
}
|
||||
|
||||
DBG(PUT("value("));
|
||||
DBG(PUT(PrintValue(&varname, NULL)));
|
||||
if (node->num_kids == 1) {
|
||||
DBG(PUT(") => "));
|
||||
} else {
|
||||
DBG(PUT(", "));
|
||||
}
|
||||
if (varname.type != STR_TYPE) {
|
||||
if (DBGX) {
|
||||
if (node->num_kids == 2) {
|
||||
PUT("?) => ");
|
||||
}
|
||||
PUT(GetErr(E_BAD_TYPE));
|
||||
OUT();
|
||||
}
|
||||
DestroyValue(varname);
|
||||
return E_BAD_TYPE;
|
||||
}
|
||||
|
||||
v = FindVar(varname.v.str, 0);
|
||||
if (!v) {
|
||||
r = E_NOSUCH_VAR;
|
||||
} else {
|
||||
r = OK;
|
||||
v->used_since_set = 1;
|
||||
CopyValue(ans, &v->v);
|
||||
if (!v->is_constant) {
|
||||
nonconst_debug(*nonconst, tr("Global variable `%s' makes expression non-constant"), varname.v.str);
|
||||
*nonconst = 1;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
if (r == OK || node->num_kids == 1) {
|
||||
DestroyValue(varname);
|
||||
if (DBGX) {
|
||||
if (node->num_kids == 2) {
|
||||
PUT("?) => ");
|
||||
}
|
||||
if (r != OK) {
|
||||
PUT(GetErr(r));
|
||||
} else {
|
||||
PUT(PrintValue(ans, NULL));
|
||||
}
|
||||
OUT();
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Variable does not exist. We have to mark the result of value()
|
||||
as non-constant because the nonexistence of a variable may depend
|
||||
on today's date (for example) */
|
||||
nonconst_debug(*nonconst, tr("Nonexistence of global variable `%s' makes value() non-constant"), varname.v.str);
|
||||
DestroyValue(varname);
|
||||
*nonconst = 1;
|
||||
r = evaluate_expr_node(cur->sibling, locals, ans, nonconst);
|
||||
if (DBGX) {
|
||||
if (node->num_kids == 2) {
|
||||
if (r != OK) {
|
||||
PUT(GetErr(r));
|
||||
PUT(") => ");
|
||||
PUT(GetErr(r));
|
||||
} else {
|
||||
PUT(PrintValue(ans, NULL));
|
||||
PUT(") => ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
}
|
||||
OUT();
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -1937,19 +2027,29 @@ static int FTrigdatetime(func_info *info)
|
||||
/* */
|
||||
/* FDaysinmon */
|
||||
/* */
|
||||
/* Returns the number of days in mon,yr */
|
||||
/* Returns the number of days in mon,yr OR month containing */
|
||||
/* given date. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int FDaysinmon(func_info *info)
|
||||
{
|
||||
if (ARG(0).type != INT_TYPE || ARG(1).type != INT_TYPE) return E_BAD_TYPE;
|
||||
int y, m;
|
||||
|
||||
if (ARGV(0) > 12 || ARGV(0) < 1 ||
|
||||
ARGV(1) < BASE || ARGV(1) > BASE+YR_RANGE)
|
||||
return E_DOMAIN_ERR;
|
||||
if (Nargs == 1) {
|
||||
if (!HASDATE(ARG(0))) return E_BAD_TYPE;
|
||||
FromDSE(DATEPART(ARG(0)), &y, &m, NULL);
|
||||
} else {
|
||||
if (ARG(1).type != INT_TYPE) return E_BAD_TYPE;
|
||||
|
||||
m = GETMON(0);
|
||||
if (m < 0) return -m;
|
||||
y = ARGV(1);
|
||||
if (y < BASE) return E_2LOW;
|
||||
if (y > BASE + YR_RANGE) return E_2HIGH;
|
||||
}
|
||||
|
||||
RetVal.type = INT_TYPE;
|
||||
RETVAL = DaysInMonth(ARGV(0)-1, ARGV(1));
|
||||
RETVAL = DaysInMonth(m, y);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1962,13 +2062,13 @@ static int FDaysinmon(func_info *info)
|
||||
/***************************************************************/
|
||||
static int FIsleap(func_info *info)
|
||||
{
|
||||
int y, m, d;
|
||||
int y;
|
||||
|
||||
if (ARG(0).type != INT_TYPE && !HASDATE(ARG(0))) return E_BAD_TYPE;
|
||||
|
||||
/* If it's a date, extract the year */
|
||||
if (HASDATE(ARG(0)))
|
||||
FromDSE(DATEPART(ARG(0)), &y, &m, &d);
|
||||
FromDSE(DATEPART(ARG(0)), &y, NULL, NULL);
|
||||
else
|
||||
y = ARGV(0);
|
||||
|
||||
@@ -2214,7 +2314,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
cur = node->child;
|
||||
|
||||
if (!(node->num_kids % 2)) {
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
r = 0;
|
||||
while(cur) {
|
||||
if (r) PUT(", ");
|
||||
@@ -2237,7 +2337,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
DBG(DBufFree(&DebugBuf));
|
||||
return r;
|
||||
}
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
if (done) PUT(", ");
|
||||
done = 1;
|
||||
PUT(PrintValue(&v, NULL));
|
||||
@@ -2245,7 +2345,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
|
||||
if (truthy(&v)) {
|
||||
r = evaluate_expr_node(cur->sibling, locals, ans, nonconst);
|
||||
if (r == OK && (DebugFlag & DB_PRTEXPR)) {
|
||||
if (r == OK && DBGX) {
|
||||
PUT(", ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
cur = cur->sibling->sibling;
|
||||
@@ -2266,7 +2366,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
|
||||
/* Return the last arg */
|
||||
r = evaluate_expr_node(cur, locals, ans, nonconst);
|
||||
if (DebugFlag & DB_PRTEXPR) {
|
||||
if (DBGX) {
|
||||
if (done) PUT(", ");
|
||||
PUT(PrintValue(ans, NULL));
|
||||
PUT(") => ");
|
||||
@@ -2285,7 +2385,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
/***************************************************************/
|
||||
static int FFilename(func_info *info)
|
||||
{
|
||||
return RetStrVal(FileName, info);
|
||||
return RetStrVal(GetCurrentFilename(), info);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -2303,7 +2403,7 @@ static int FFiledir(func_info *info)
|
||||
|
||||
DBufInit(&buf);
|
||||
|
||||
if (DBufPuts(&buf, FileName) != OK) return E_NO_MEM;
|
||||
if (DBufPuts(&buf, GetCurrentFilename()) != OK) return E_NO_MEM;
|
||||
if (DBufLen(&buf) == 0) {
|
||||
DBufFree(&buf);
|
||||
return RetStrVal(".", info);
|
||||
@@ -2363,12 +2463,12 @@ static int FAccess(func_info *info)
|
||||
static int FTypeof(func_info *info)
|
||||
{
|
||||
switch(ARG(0).type) {
|
||||
case INT_TYPE: return RetStrVal("INT", info);
|
||||
case DATE_TYPE: return RetStrVal("DATE", info);
|
||||
case TIME_TYPE: return RetStrVal("TIME", info);
|
||||
case STR_TYPE: return RetStrVal("STRING", info);
|
||||
case INT_TYPE: return RetStrVal("INT", info);
|
||||
case DATE_TYPE: return RetStrVal("DATE", info);
|
||||
case TIME_TYPE: return RetStrVal("TIME", info);
|
||||
case STR_TYPE: return RetStrVal("STRING", info);
|
||||
case DATETIME_TYPE: return RetStrVal("DATETIME", info);
|
||||
default: return RetStrVal("ERR", info);
|
||||
default: return RetStrVal("ERR", info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2754,7 +2854,7 @@ static int FEasterdate(func_info *info)
|
||||
int base;
|
||||
if (Nargs == 0) {
|
||||
base = DSEToday;
|
||||
FromDSE(DSEToday, &y, &m, &d);
|
||||
FromDSE(DSEToday, &y, NULL, NULL);
|
||||
} else {
|
||||
if (ARG(0).type == INT_TYPE) {
|
||||
base = -1;
|
||||
@@ -2763,7 +2863,7 @@ static int FEasterdate(func_info *info)
|
||||
else if (y > BASE+YR_RANGE) return E_2HIGH;
|
||||
} else if (HASDATE(ARG(0))) {
|
||||
base = DATEPART(ARG(0));
|
||||
FromDSE(DATEPART(ARG(0)), &y, &m, &d); /* We just want the year */
|
||||
FromDSE(DATEPART(ARG(0)), &y, NULL, NULL); /* We just want the year */
|
||||
} else return E_BAD_TYPE;
|
||||
}
|
||||
|
||||
@@ -2807,7 +2907,7 @@ static int FOrthodoxeaster(func_info *info)
|
||||
int base = -1;
|
||||
if (Nargs == 0) {
|
||||
base = DSEToday;
|
||||
FromDSE(DSEToday, &y, &m, &d);
|
||||
FromDSE(DSEToday, &y, NULL, NULL);
|
||||
} else {
|
||||
if (ARG(0).type == INT_TYPE) {
|
||||
y = ARGV(0);
|
||||
@@ -2815,7 +2915,7 @@ static int FOrthodoxeaster(func_info *info)
|
||||
else if (y > BASE+YR_RANGE) return E_2HIGH;
|
||||
} else if (HASDATE(ARG(0))) {
|
||||
base = DATEPART(ARG(0));
|
||||
FromDSE(DATEPART(ARG(0)), &y, &m, &d); /* We just want the year */
|
||||
FromDSE(DATEPART(ARG(0)), &y, NULL, NULL); /* We just want the year */
|
||||
} else return E_BAD_TYPE;
|
||||
}
|
||||
|
||||
@@ -3843,7 +3943,7 @@ FSlide(func_info *info)
|
||||
for (i=localargs; i<Nargs; i++) {
|
||||
if (ARG(i).type != STR_TYPE) return E_BAD_TYPE;
|
||||
FindToken(ARG(i).v.str, &tok);
|
||||
if (tok.type != T_WkDay) return E_UNKNOWN_TOKEN;
|
||||
if (tok.type != T_WkDay) return E_CANT_PARSE_WKDAY;
|
||||
localomit |= (1 << tok.val);
|
||||
}
|
||||
|
||||
@@ -3901,7 +4001,7 @@ FNonomitted(func_info *info)
|
||||
for (i=localargs; i<Nargs; i++) {
|
||||
if (ARG(i).type != STR_TYPE) return E_BAD_TYPE;
|
||||
FindToken(ARG(i).v.str, &tok);
|
||||
if (tok.type != T_WkDay) return E_UNKNOWN_TOKEN;
|
||||
if (tok.type != T_WkDay) return E_CANT_PARSE_WKDAY;
|
||||
localomit |= (1 << tok.val);
|
||||
}
|
||||
|
||||
@@ -3992,6 +4092,7 @@ FEval(func_info *info)
|
||||
{
|
||||
expr_node *n;
|
||||
int r;
|
||||
int run_was_enabled = 0;
|
||||
|
||||
ASSERT_TYPE(0, STR_TYPE);
|
||||
char const *e = ARGSTR(0);
|
||||
@@ -4002,7 +4103,15 @@ FEval(func_info *info)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Disable shell() command in eval */
|
||||
if (! (RunDisabled & RUN_IN_EVAL)) {
|
||||
run_was_enabled = 1;
|
||||
RunDisabled |= RUN_IN_EVAL;
|
||||
}
|
||||
r = evaluate_expr_node(n, NULL, &(info->retval), &(info->nonconst));
|
||||
if (run_was_enabled) {
|
||||
RunDisabled &= ~RUN_IN_EVAL;
|
||||
}
|
||||
free_expr_tree(n);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,6 @@ EXTERN INIT( int SynthesizeTags, 0);
|
||||
EXTERN INIT( int ScFormat, SC_AMPM);
|
||||
EXTERN INIT( int MaxSatIter, 1000);
|
||||
EXTERN INIT( int MaxStringLen, MAX_STR_LEN);
|
||||
EXTERN INIT( char *FileName, NULL);
|
||||
EXTERN INIT( int UseStdin, 0);
|
||||
EXTERN INIT( int PurgeMode, 0);
|
||||
EXTERN INIT( int PurgeIncludeDepth, 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* HASHTAB_STATS.C */
|
||||
/* HASHTAB.C */
|
||||
/* */
|
||||
/* Implementation of hash table. */
|
||||
/* */
|
||||
|
||||
@@ -186,6 +186,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
InitUserFunctions();
|
||||
|
||||
InitTranslationTable();
|
||||
InitFiles();
|
||||
|
||||
/* If stdout is a terminal, initialize $FormWidth to terminal width-8,
|
||||
but clamp to [20, 500] */
|
||||
@@ -644,6 +645,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
case 'f': case 'F': DebugFlag |= DB_TRACE_FILES; break;
|
||||
case 'q': case 'Q': DebugFlag |= DB_TRANSLATE; break;
|
||||
case 'n': case 'N': DebugFlag |= DB_NONCONST; break;
|
||||
case 'u': case 'U': DebugFlag |= DB_UNUSED_VARS; break;
|
||||
default:
|
||||
fprintf(ErrFp, GetErr(M_BAD_DB_FLAG), *(arg-1));
|
||||
fprintf(ErrFp, "\n");
|
||||
@@ -836,7 +838,7 @@ void Usage(void)
|
||||
fprintf(ErrFp, " -q Don't queue timed reminders\n");
|
||||
fprintf(ErrFp, " -f Trigger timed reminders by staying in foreground\n");
|
||||
fprintf(ErrFp, " -z[n] Enter daemon mode, waking every n (1) minutes.\n");
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline f=tracefiles\n");
|
||||
fprintf(ErrFp, " -d... Debug: See man page for details\n");
|
||||
fprintf(ErrFp, " -e Divert messages normally sent to stderr to stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Time format for cal: 0=am/pm, 1=24hr, 2=none\n");
|
||||
fprintf(ErrFp, " -x[n] Iteration limit for SATISFY clause (def=1000)\n");
|
||||
|
||||
64
src/main.c
64
src/main.c
@@ -60,6 +60,9 @@ exitfunc(void)
|
||||
/* Kill any execution-time-limiter process */
|
||||
unlimit_execution_time();
|
||||
|
||||
if (DebugFlag & DB_UNUSED_VARS) {
|
||||
DumpUnusedVars();
|
||||
}
|
||||
if (DebugFlag & DB_HASHSTATS) {
|
||||
fflush(stdout);
|
||||
fflush(ErrFp);
|
||||
@@ -456,6 +459,15 @@ void FromDSE(int dse, int *y, int *m, int *d)
|
||||
try_yr--;
|
||||
try_dse -= DaysInYear(try_yr);
|
||||
}
|
||||
if (y) {
|
||||
*y = try_yr;
|
||||
}
|
||||
|
||||
/* If all we want is the year, we can quit here */
|
||||
if (!d && !m) {
|
||||
return;
|
||||
}
|
||||
|
||||
dse -= try_dse;
|
||||
|
||||
t = DaysInMonth(try_mon, try_yr);
|
||||
@@ -464,9 +476,6 @@ void FromDSE(int dse, int *y, int *m, int *d)
|
||||
try_mon++;
|
||||
t = DaysInMonth(try_mon, try_yr);
|
||||
}
|
||||
if (y) {
|
||||
*y = try_yr;
|
||||
}
|
||||
if (m) {
|
||||
*m = try_mon;
|
||||
}
|
||||
@@ -899,24 +908,17 @@ void Wprint(char const *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
char const *fname = GetCurrentFilename();
|
||||
if (SuppressErrorOutputInCatch) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* We can't use line_range because caller might have used it */
|
||||
if (FileName) {
|
||||
if (strcmp(FileName, "-")) {
|
||||
if (LineNoStart == LineNo) {
|
||||
(void) fprintf(ErrFp, "%s(%d): ", FileName, LineNo);
|
||||
} else {
|
||||
(void) fprintf(ErrFp, "%s(%d:%d): ", FileName, LineNoStart, LineNo);
|
||||
}
|
||||
if (fname) {
|
||||
if (LineNoStart == LineNo) {
|
||||
(void) fprintf(ErrFp, "%s(%d): ", fname, LineNo);
|
||||
} else {
|
||||
if (LineNoStart == LineNo) {
|
||||
(void) fprintf(ErrFp, "-stdin-(%d): ", LineNo);
|
||||
} else {
|
||||
(void) fprintf(ErrFp, "-stdin-(%d:%d): ", LineNoStart, LineNo);
|
||||
}
|
||||
(void) fprintf(ErrFp, "%s(%d:%d): ", fname, LineNoStart, LineNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,24 +936,27 @@ void Wprint(char const *fmt, ...)
|
||||
void Eprint(char const *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char const *fname;
|
||||
|
||||
if (SuppressErrorOutputInCatch) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if more than one error msg. from this line */
|
||||
if (!FreshLine && !ShowAllErrors) return;
|
||||
|
||||
if (!FileName) {
|
||||
if (should_ignore_line()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(FileName, "-")) {
|
||||
fname = FileName;
|
||||
} else {
|
||||
fname = "-stdin-";
|
||||
char const *fname = GetCurrentFilename();
|
||||
if (!fname) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (LineNo < 1) {
|
||||
/* Not yet processing a file */
|
||||
return;
|
||||
}
|
||||
/* Check if more than one error msg. from this line */
|
||||
if (!FreshLine && !ShowAllErrors) return;
|
||||
|
||||
if (FreshLine) {
|
||||
/* We can't use line_range because caller might have used it */
|
||||
if (LineNo == LineNoStart) {
|
||||
@@ -1362,6 +1367,11 @@ int DoDebug(ParsePtr p)
|
||||
if (val) DebugFlag |= DB_NONCONST;
|
||||
else DebugFlag &= ~DB_NONCONST;
|
||||
break;
|
||||
case 'u':
|
||||
case 'U':
|
||||
if (val) DebugFlag |= DB_UNUSED_VARS;
|
||||
else DebugFlag &= ~DB_UNUSED_VARS;
|
||||
break;
|
||||
default:
|
||||
Wprint(GetErr(M_BAD_DB_FLAG), ch);
|
||||
break;
|
||||
@@ -1990,9 +2000,11 @@ SaveAllTriggerInfo(Trigger const *t, TimeTrig const *tt, int trigdate, int trigt
|
||||
{
|
||||
SaveLastTrigger(t);
|
||||
SaveLastTimeTrig(tt);
|
||||
LastTriggerDate = trigdate;
|
||||
if (trigdate != -1) {
|
||||
LastTriggerDate = trigdate;
|
||||
LastTrigValid = valid;
|
||||
}
|
||||
LastTriggerTime = trigtime;
|
||||
LastTrigValid = valid;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
23
src/omit.c
23
src/omit.c
@@ -36,7 +36,7 @@ int NumFullOmits, NumPartialOmits;
|
||||
/* The structure for saving and restoring OMIT contexts */
|
||||
typedef struct omitcontext {
|
||||
struct omitcontext *next;
|
||||
char *filename;
|
||||
char const *filename;
|
||||
int lineno;
|
||||
int numfull, numpart;
|
||||
int *fullsave;
|
||||
@@ -98,7 +98,6 @@ int DestroyOmitContexts(int print_unmatched)
|
||||
num++;
|
||||
if (c->fullsave) free(c->fullsave);
|
||||
if (c->partsave) free(c->partsave);
|
||||
if (c->filename) free(c->filename);
|
||||
d = c->next;
|
||||
free(c);
|
||||
c = d;
|
||||
@@ -122,14 +121,10 @@ int PushOmitContext(ParsePtr p)
|
||||
context = NEW(OmitContext);
|
||||
if (!context) return E_NO_MEM;
|
||||
|
||||
if (FileName) {
|
||||
context->filename = StrDup(FileName);
|
||||
if (GetCurrentFilename()) {
|
||||
context->filename = GetCurrentFilename();
|
||||
} else {
|
||||
context->filename = StrDup("");
|
||||
}
|
||||
if (!context->filename) {
|
||||
free(context);
|
||||
return E_NO_MEM;
|
||||
context->filename = "";
|
||||
}
|
||||
context->lineno = LineNo;
|
||||
context->numfull = NumFullOmits;
|
||||
@@ -137,13 +132,11 @@ int PushOmitContext(ParsePtr p)
|
||||
context->weekdaysave = WeekdayOmits;
|
||||
context->fullsave = malloc(NumFullOmits * sizeof(int));
|
||||
if (NumFullOmits && !context->fullsave) {
|
||||
free(context->filename);
|
||||
free(context);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
context->partsave = malloc(NumPartialOmits * sizeof(int));
|
||||
if (NumPartialOmits && !context->partsave) {
|
||||
free(context->filename);
|
||||
if (context->fullsave) {
|
||||
free(context->fullsave);
|
||||
}
|
||||
@@ -172,6 +165,7 @@ int PopOmitContext(ParsePtr p)
|
||||
{
|
||||
|
||||
OmitContext *c = SavedOmitContexts;
|
||||
char const *fname = GetCurrentFilename();
|
||||
|
||||
if (!c) return E_POP_NO_PUSH;
|
||||
NumFullOmits = c->numfull;
|
||||
@@ -185,13 +179,12 @@ int PopOmitContext(ParsePtr p)
|
||||
/* Remove the context from the stack */
|
||||
SavedOmitContexts = c->next;
|
||||
|
||||
if (c->filename && FileName && strcmp(c->filename, FileName)) {
|
||||
Wprint(tr("POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d"), FileName, LineNo, c->filename, c->lineno);
|
||||
if (c->filename && fname && strcmp(c->filename, fname)) {
|
||||
Wprint(tr("POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d"), fname, LineNo, c->filename, c->lineno);
|
||||
}
|
||||
/* Free memory used by the saved context */
|
||||
if (c->partsave) free(c->partsave);
|
||||
if (c->fullsave) free(c->fullsave);
|
||||
if (c->filename) free(c->filename);
|
||||
free(c);
|
||||
|
||||
return VerifyEoln(p);
|
||||
@@ -249,7 +242,7 @@ int IsOmitted(int dse, int localomit, char const *omitfunc, int *omit)
|
||||
return OK;
|
||||
}
|
||||
|
||||
FromDSE(dse, &y, &m, &d);
|
||||
FromDSE(dse, NULL, &m, &d);
|
||||
if (BexistsIntArray(PartialOmitArray, NumPartialOmits, (m << 5) + d)) {
|
||||
*omit = 1;
|
||||
return OK;
|
||||
|
||||
@@ -157,6 +157,7 @@ int DoSet (Parser *p);
|
||||
int DoUnset (Parser *p);
|
||||
int DoDump (ParsePtr p);
|
||||
void DumpVarTable (int dump_constness);
|
||||
void DumpUnusedVars(void);
|
||||
void DestroyVars (int all);
|
||||
int PreserveVar (char const *name);
|
||||
int DoPreserve (Parser *p);
|
||||
@@ -268,6 +269,7 @@ void InitDedupeTable(void);
|
||||
void InitVars(void);
|
||||
void InitUserFunctions(void);
|
||||
void InitTranslationTable(void);
|
||||
void InitFiles(void);
|
||||
char const *GetTranslatedString(char const *orig);
|
||||
int GetTranslatedStringTryingVariants(char const *orig, DynamicBuffer *out);
|
||||
char const *GetErr(int r);
|
||||
@@ -304,8 +306,5 @@ int should_ignore_line(void);
|
||||
int in_constant_context(void);
|
||||
void pop_excess_ifs(char const *fname);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void SetCurrentFilename(char const *fname);
|
||||
char const *GetCurrentFilename(void);
|
||||
|
||||
74
src/queue.c
74
src/queue.c
@@ -12,12 +12,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* Solaris needs this to get select() prototype */
|
||||
#ifdef __sun__
|
||||
#define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
/* We only want object code generated if we have queued reminders */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
@@ -45,13 +39,6 @@ static void consume_inotify_events(int fd);
|
||||
static int setup_inotify_watch(void);
|
||||
#endif
|
||||
|
||||
/* A list of filenames associated with queued reminders */
|
||||
typedef struct queuedfname {
|
||||
struct queuedfname *next;
|
||||
char const *fname;
|
||||
} QueuedFilename;
|
||||
|
||||
|
||||
/* List structure for holding queued reminders */
|
||||
typedef struct queuedrem {
|
||||
struct queuedrem *next;
|
||||
@@ -72,7 +59,6 @@ typedef struct queuedrem {
|
||||
/* Global variables */
|
||||
|
||||
static QueuedRem *QueueHead = NULL;
|
||||
static QueuedFilename *Files = NULL;
|
||||
static time_t FileModTime;
|
||||
static struct stat StatBuf;
|
||||
|
||||
@@ -83,7 +69,6 @@ static int CalculateNextTimeUsingSched (QueuedRem *q);
|
||||
static void ServerWait (struct timeval *sleep_tv);
|
||||
static void reread (void);
|
||||
static void PrintQueue(void);
|
||||
static char const *QueueFilename(char const *fname);
|
||||
|
||||
static void chomp(DynamicBuffer *buf)
|
||||
{
|
||||
@@ -112,48 +97,6 @@ char const *SimpleTimeNoSpace(int tim)
|
||||
return s;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* QueueFilename */
|
||||
/* */
|
||||
/* Add fname to the list of queued filenames if it's not */
|
||||
/* already present. Either way, return a pointer to the */
|
||||
/* filename. Returns NULL if out of memory */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static QueuedFilename *last_file_found = NULL;
|
||||
static char const *QueueFilename(char const *fname)
|
||||
{
|
||||
QueuedFilename *elem = Files;
|
||||
|
||||
/* Optimization: We are very likely in the same file as
|
||||
before... */
|
||||
if (last_file_found && !strcmp(fname, last_file_found->fname)) {
|
||||
return last_file_found->fname;
|
||||
}
|
||||
|
||||
/* No such luck; search the list */
|
||||
while(elem) {
|
||||
if (!strcmp(elem->fname, fname)) {
|
||||
last_file_found = elem;
|
||||
return elem->fname;
|
||||
}
|
||||
elem = elem->next;
|
||||
}
|
||||
/* Not found... queue it */
|
||||
elem = NEW(QueuedFilename);
|
||||
if (!elem) return NULL;
|
||||
elem->fname = StrDup(fname);
|
||||
if (!elem->fname) {
|
||||
free(elem);
|
||||
return NULL;
|
||||
}
|
||||
elem->next = Files;
|
||||
Files = elem;
|
||||
last_file_found = elem;
|
||||
return elem->fname;
|
||||
}
|
||||
|
||||
static void del_reminder(QueuedRem *qid)
|
||||
{
|
||||
QueuedRem *q = QueueHead;
|
||||
@@ -217,13 +160,7 @@ int QueueReminder(ParsePtr p, Trigger *trig,
|
||||
free(qelem);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
qelem->fname = QueueFilename(FileName);
|
||||
if (!qelem->fname) {
|
||||
free((void *) qelem->text);
|
||||
free(qelem);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
|
||||
qelem->fname = GetCurrentFilename();
|
||||
qelem->lineno = LineNo;
|
||||
qelem->lineno_start = LineNoStart;
|
||||
NumQueued++;
|
||||
@@ -327,12 +264,6 @@ void HandleQueuedReminders(void)
|
||||
/* Turn off sorting -- otherwise, TriggerReminder has no effect! */
|
||||
SortByDate = 0;
|
||||
|
||||
/* Free FileName if necessary */
|
||||
if (FileName) {
|
||||
free(FileName);
|
||||
FileName = NULL;
|
||||
}
|
||||
|
||||
/* We don't need to keep the dedupe table around */
|
||||
ClearDedupeTable();
|
||||
|
||||
@@ -495,7 +426,7 @@ void HandleQueuedReminders(void)
|
||||
/* Set up global variables so some functions like trigdate()
|
||||
and trigtime() work correctly */
|
||||
SaveAllTriggerInfo(&(q->t), &(q->tt), DSEToday, q->tt.ttime, 1);
|
||||
FileName = (char *) q->fname;
|
||||
SetCurrentFilename(q->fname);
|
||||
DefaultColorR = q->red;
|
||||
DefaultColorG = q->green;
|
||||
DefaultColorB = q->blue;
|
||||
@@ -516,7 +447,6 @@ void HandleQueuedReminders(void)
|
||||
} else {
|
||||
(void) TriggerReminder(&p, &tcopy, &q->tt, DSEToday, 1, NULL);
|
||||
}
|
||||
FileName = NULL;
|
||||
if (IsServerMode() && !DaemonJSON && q->typ != RUN_TYPE) {
|
||||
printf("NOTE endreminder\n");
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
executes 'return' if an initial non-numeric char is found. */
|
||||
#define PARSENUM(var, string) \
|
||||
if (!isdigit(*(string))) return; \
|
||||
var = 0; \
|
||||
(var) = 0; \
|
||||
while (isdigit(*(string))) { \
|
||||
var *= 10; \
|
||||
var += *(string) - '0'; \
|
||||
string++; \
|
||||
(var) *= 10; \
|
||||
(var) += *(string) - '0'; \
|
||||
(string)++; \
|
||||
}
|
||||
|
||||
/* The big array holding all recognized (literal) tokens in reminder file.
|
||||
|
||||
@@ -310,15 +310,15 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
{
|
||||
int simple, mod, omit;
|
||||
|
||||
/* First: Have we passed the UNTIL date? */
|
||||
/* First: Have we passed the UNTIL date? */
|
||||
if (trig->until != NO_UNTIL &&
|
||||
trig->until < start) {
|
||||
trig->expired = 1;
|
||||
return -1; /* expired */
|
||||
}
|
||||
|
||||
/* Next: If it's an "AFTER"-type skip, back up
|
||||
until we're at the start of a block of holidays */
|
||||
/* Next: If it's an "AFTER"-type skip, back up
|
||||
until we're at the start of a block of holidays */
|
||||
if (trig->skip == AFTER_SKIP) {
|
||||
int iter = 0;
|
||||
while (iter++ <= MaxSatIter) {
|
||||
@@ -339,16 +339,16 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
}
|
||||
}
|
||||
|
||||
/* Find the next simple trigger */
|
||||
/* Find the next simple trigger */
|
||||
simple = NextSimpleTrig(start, trig, err);
|
||||
|
||||
/* Problems? */
|
||||
/* Problems? */
|
||||
if (*err || (simple == -1)) return -1;
|
||||
|
||||
/* Suggested starting point for next attempt */
|
||||
/* Suggested starting point for next attempt */
|
||||
*nextstart = simple+1;
|
||||
|
||||
/* If there's a BACK, back up... */
|
||||
/* If there's a BACK, back up... */
|
||||
if (trig->back != NO_BACK) {
|
||||
mod = trig->back;
|
||||
if (mod < 0) {
|
||||
@@ -376,7 +376,7 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
}
|
||||
}
|
||||
|
||||
/* If there's a REP, calculate the next occurrence */
|
||||
/* If there's a REP, calculate the next occurrence */
|
||||
if (trig->rep != NO_REP) {
|
||||
if (simple < start) {
|
||||
mod = (start - simple) / trig->rep;
|
||||
@@ -385,7 +385,7 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's a "BEFORE"-type skip, back up */
|
||||
/* If it's a "BEFORE"-type skip, back up */
|
||||
if (trig->skip == BEFORE_SKIP) {
|
||||
int iter = 0;
|
||||
while(iter++ <= MaxSatIter) {
|
||||
@@ -406,7 +406,7 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's an "AFTER"-type skip, jump ahead */
|
||||
/* If it's an "AFTER"-type skip, jump ahead */
|
||||
if (trig->skip == AFTER_SKIP) {
|
||||
int iter = 0;
|
||||
while (iter++ <= MaxSatIter) {
|
||||
@@ -423,7 +423,12 @@ static int GetNextTriggerDate(Trigger *trig, int start, int *err, int *nextstart
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the date */
|
||||
/* If we've passed the UNTIL, then it's expired */
|
||||
if (trig->until != NO_UNTIL && simple > trig->until) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Return the date */
|
||||
return simple;
|
||||
}
|
||||
|
||||
@@ -453,7 +458,7 @@ AdjustTriggerForDuration(int today, int r, Trigger *trig, TimeTrig *tim, int sav
|
||||
if (DebugFlag & DB_PRTTRIG) {
|
||||
FromDSE(r, &y, &m, &d);
|
||||
fprintf(ErrFp, "%s(%s): Trig(adj) = %s, %d %s, %d",
|
||||
FileName, line_range(LineNoStart, LineNo),
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo),
|
||||
get_day_name(r % 7),
|
||||
d,
|
||||
get_month_name(m),
|
||||
@@ -536,6 +541,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
||||
trig->expired = 0;
|
||||
if (save_in_globals) {
|
||||
LastTrigValid = 0;
|
||||
LastTriggerDate = -1;
|
||||
}
|
||||
|
||||
/* Assume everything works */
|
||||
@@ -574,14 +580,13 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
||||
|
||||
while (nattempts++ < TRIG_ATTEMPTS) {
|
||||
result = GetNextTriggerDate(trig, start, err, &nextstart);
|
||||
|
||||
/* If there's an error, die immediately */
|
||||
if (*err) return -1;
|
||||
if (result == -1) {
|
||||
trig->expired = 1;
|
||||
if (DebugFlag & DB_PRTTRIG) {
|
||||
fprintf(ErrFp, "%s(%s): %s\n",
|
||||
FileName, line_range(LineNoStart, LineNo), GetErr(E_EXPIRED));
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo), GetErr(E_EXPIRED));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -604,7 +609,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
||||
if (DebugFlag & DB_PRTTRIG) {
|
||||
FromDSE(result, &y, &m, &d);
|
||||
fprintf(ErrFp, "%s(%s): Trig = %s, %d %s, %d",
|
||||
FileName, line_range(LineNoStart, LineNo),
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo),
|
||||
get_day_name(result % 7),
|
||||
d,
|
||||
get_month_name(m),
|
||||
@@ -630,8 +635,9 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
||||
trig->rep == NO_REP) {
|
||||
trig->expired = 1;
|
||||
if (DebugFlag & DB_PRTTRIG) {
|
||||
fprintf(ErrFp, "%s(%s): %s\n",
|
||||
FileName, line_range(LineNoStart, LineNo), GetErr(E_EXPIRED));
|
||||
FromDSE(result, &y, &m, &d);
|
||||
fprintf(ErrFp, "%s(%s): %s: %04d-%02d-%02d\n",
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo), GetErr(E_EXPIRED), y, m+1, d);
|
||||
}
|
||||
if (save_in_globals) {
|
||||
LastTriggerDate = result;
|
||||
@@ -656,7 +662,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
||||
trig->expired = 1;
|
||||
if (DebugFlag & DB_PRTTRIG) {
|
||||
fprintf(ErrFp, "%s(%s): %s\n",
|
||||
FileName, line_range(LineNoStart, LineNo), GetErr(E_EXPIRED));
|
||||
GetCurrentFilename(), line_range(LineNoStart, LineNo), GetErr(E_EXPIRED));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,10 @@ typedef struct var {
|
||||
struct hash_link link;
|
||||
char name[VAR_NAME_LEN+1];
|
||||
char preserve;
|
||||
char nonconstant;
|
||||
char is_constant;
|
||||
char used_since_set;
|
||||
char const *filename;
|
||||
int lineno;
|
||||
Value v;
|
||||
} Var;
|
||||
|
||||
@@ -218,6 +221,7 @@ typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||
#define DB_HASHSTATS 0x080
|
||||
#define DB_TRANSLATE 0x100
|
||||
#define DB_NONCONST 0x200
|
||||
#define DB_UNUSED_VARS 0x400
|
||||
|
||||
/* Enumeration of the tokens */
|
||||
enum TokTypes
|
||||
@@ -252,6 +256,7 @@ typedef struct {
|
||||
#define RUN_CMDLINE 0x01
|
||||
#define RUN_SCRIPT 0x02
|
||||
#define RUN_NOTOWNER 0x04
|
||||
#define RUN_IN_EVAL 0x08
|
||||
|
||||
/* Flags for the SimpleCalendar format */
|
||||
#define SC_AMPM 0 /* Time shown as 3:00am, etc. */
|
||||
|
||||
@@ -181,12 +181,34 @@ int DoFset(ParsePtr p)
|
||||
Var *locals = NULL;
|
||||
Var local_array[MAX_FUNC_ARGS];
|
||||
int orig_namelen;
|
||||
int suppress_redefined_function_warning = 0;
|
||||
int ch;
|
||||
|
||||
DynamicBuffer buf;
|
||||
DBufInit(&buf);
|
||||
|
||||
|
||||
ch = ParseNonSpaceChar(p, &r, 1);
|
||||
if (r) {
|
||||
return r;
|
||||
}
|
||||
if (ch == '-') {
|
||||
r = ParseToken(p, &buf);
|
||||
if (r) {
|
||||
return r;
|
||||
}
|
||||
if (strcmp(DBufValue(&buf), "-")) {
|
||||
DBufFree(&buf);
|
||||
return E_PARSE_ERR;
|
||||
}
|
||||
suppress_redefined_function_warning = 1;
|
||||
DBufFree(&buf);
|
||||
}
|
||||
|
||||
/* Get the function name */
|
||||
if ( (r=ParseIdentifier(p, &buf)) ) return r;
|
||||
if ( (r=ParseIdentifier(p, &buf)) ) {
|
||||
return r;
|
||||
}
|
||||
if (*DBufValue(&buf) == '$') {
|
||||
DBufFree(&buf);
|
||||
return E_BAD_ID;
|
||||
@@ -214,7 +236,7 @@ int DoFset(ParsePtr p)
|
||||
file, do nothing */
|
||||
existing = FindUserFunc(DBufValue(&buf));
|
||||
if (existing) {
|
||||
if (!strcmp(existing->filename, FileName) &&
|
||||
if (!strcmp(existing->filename, GetCurrentFilename()) &&
|
||||
strcmp(existing->filename, "[cmdline]") &&
|
||||
existing->lineno == LineNo) {
|
||||
DBufFree(&buf);
|
||||
@@ -222,8 +244,10 @@ int DoFset(ParsePtr p)
|
||||
return OK;
|
||||
}
|
||||
/* Warn about redefinition */
|
||||
Wprint(tr("Function `%s' redefined: previously defined at %s(%s)"),
|
||||
existing->name, existing->filename, line_range(existing->lineno_start, existing->lineno));
|
||||
if (!suppress_redefined_function_warning) {
|
||||
Wprint(tr("Function `%s' redefined: previously defined at %s(%s)"),
|
||||
existing->name, existing->filename, line_range(existing->lineno_start, existing->lineno));
|
||||
}
|
||||
}
|
||||
|
||||
/* Should be followed by '(' */
|
||||
@@ -242,14 +266,10 @@ int DoFset(ParsePtr p)
|
||||
DBufFree(&buf);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
if (FileName) {
|
||||
func->filename = StrDup(FileName);
|
||||
if (GetCurrentFilename()) {
|
||||
func->filename = GetCurrentFilename();
|
||||
} else {
|
||||
func->filename = StrDup("[cmdline]");
|
||||
}
|
||||
if (!func->filename) {
|
||||
free(func);
|
||||
return E_NO_MEM;
|
||||
func->filename = "[cmdline]";
|
||||
}
|
||||
func->lineno = LineNo;
|
||||
func->lineno_start = LineNoStart;
|
||||
@@ -393,9 +413,6 @@ static void DestroyUserFunc(UserFunc *f)
|
||||
/* Free the function definition */
|
||||
if (f->node) free_expr_tree(f->node);
|
||||
|
||||
/* Free the filename */
|
||||
if (f->filename) free( (char *) f->filename);
|
||||
|
||||
/* Free arg names */
|
||||
if (f->args) {
|
||||
for (i=0; i<f->nargs; i++) {
|
||||
|
||||
98
src/var.c
98
src/var.c
@@ -285,7 +285,7 @@ static int trig_until_func(int do_set, Value *val)
|
||||
|
||||
static int trig_day_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int d;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
if (!LastTrigValid) {
|
||||
@@ -293,7 +293,7 @@ static int trig_day_func(int do_set, Value *val)
|
||||
return OK;
|
||||
}
|
||||
|
||||
FromDSE(LastTriggerDate, &y, &m, &d);
|
||||
FromDSE(LastTriggerDate, NULL, NULL, &d);
|
||||
val->v.val = d;
|
||||
return OK;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ static int timet_is_64_func(int do_set, Value *val)
|
||||
|
||||
static int trig_mon_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int m;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
if (!LastTrigValid) {
|
||||
@@ -320,14 +320,14 @@ static int trig_mon_func(int do_set, Value *val)
|
||||
return OK;
|
||||
}
|
||||
|
||||
FromDSE(LastTriggerDate, &y, &m, &d);
|
||||
FromDSE(LastTriggerDate, NULL, &m, NULL);
|
||||
val->v.val = m+1;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int trig_year_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int y;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
if (!LastTrigValid) {
|
||||
@@ -335,7 +335,7 @@ static int trig_year_func(int do_set, Value *val)
|
||||
return OK;
|
||||
}
|
||||
|
||||
FromDSE(LastTriggerDate, &y, &m, &d);
|
||||
FromDSE(LastTriggerDate, &y, NULL, NULL);
|
||||
val->v.val = y;
|
||||
return OK;
|
||||
}
|
||||
@@ -362,30 +362,30 @@ static int today_date_func(int do_set, Value *val)
|
||||
}
|
||||
static int today_day_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int d;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
FromDSE(DSEToday, &y, &m, &d);
|
||||
FromDSE(DSEToday, NULL, NULL, &d);
|
||||
val->v.val = d;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int today_mon_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int m;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
FromDSE(DSEToday, &y, &m, &d);
|
||||
FromDSE(DSEToday, NULL, &m, NULL);
|
||||
val->v.val = m+1;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int today_year_func(int do_set, Value *val)
|
||||
{
|
||||
int y, m, d;
|
||||
int y;
|
||||
UNUSED(do_set);
|
||||
val->type = INT_TYPE;
|
||||
FromDSE(DSEToday, &y, &m, &d);
|
||||
FromDSE(DSEToday, &y, NULL, NULL);
|
||||
val->v.val = y;
|
||||
return OK;
|
||||
}
|
||||
@@ -560,6 +560,9 @@ Var *FindVar(char const *str, int create)
|
||||
v->v.type = INT_TYPE;
|
||||
v->v.v.val = 0;
|
||||
v->preserve = 0;
|
||||
v->is_constant = 1;
|
||||
v->filename = "";
|
||||
v->lineno = 0;
|
||||
StrnCpy(v->name, str, VAR_NAME_LEN);
|
||||
|
||||
hash_table_insert(&VHashTbl, v);
|
||||
@@ -579,6 +582,9 @@ int DeleteVar(char const *str)
|
||||
|
||||
v = FindVar(str, 0);
|
||||
if (!v) return E_NOSUCH_VAR;
|
||||
if ((DebugFlag & DB_UNUSED_VARS) && !v->used_since_set) {
|
||||
Eprint(tr("`%s' UNSET without being used (previous SET: %s:%d)"), str, v->filename, v->lineno);
|
||||
}
|
||||
DestroyValue(v->v);
|
||||
hash_table_delete(&VHashTbl, v);
|
||||
return OK;
|
||||
@@ -593,13 +599,26 @@ int DeleteVar(char const *str)
|
||||
/***************************************************************/
|
||||
int SetVar(char const *str, Value const *val, int nonconst_expr)
|
||||
{
|
||||
Var *v = FindVar(str, 1);
|
||||
Var *v = NULL;
|
||||
|
||||
if (DebugFlag & DB_UNUSED_VARS) {
|
||||
v = FindVar(str, 0);
|
||||
if (v && !(v->used_since_set)) {
|
||||
Eprint(tr("`%s' re-SET without being used (previous SET: %s:%d)"), str, v->filename, v->lineno);
|
||||
}
|
||||
}
|
||||
|
||||
if (!v) {
|
||||
v = FindVar(str, 1);
|
||||
}
|
||||
if (!v) return E_NO_MEM; /* Only way FindVar can fail */
|
||||
|
||||
DestroyValue(v->v);
|
||||
v->v = *val;
|
||||
v->nonconstant = nonconst_expr;
|
||||
v->is_constant = ! nonconst_expr;
|
||||
v->used_since_set = 0;
|
||||
v->filename = GetCurrentFilename();
|
||||
v->lineno = LineNo;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -620,6 +639,7 @@ int GetVarValue(char const *str, Value *val)
|
||||
Eprint("%s: `%s'", GetErr(E_NOSUCH_VAR), str);
|
||||
return E_NOSUCH_VAR;
|
||||
}
|
||||
v->used_since_set = 1;
|
||||
return CopyValue(val, &v->v);
|
||||
}
|
||||
|
||||
@@ -641,7 +661,13 @@ int DoSet (Parser *p)
|
||||
Var *var;
|
||||
|
||||
r = ParseIdentifier(p, &buf);
|
||||
if (r) return r;
|
||||
if (r) {
|
||||
DBufFree(&buf);
|
||||
if (ignoring) {
|
||||
return OK;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
if (ignoring) {
|
||||
/* We're only here to mark a variable as non-const */
|
||||
@@ -651,8 +677,8 @@ int DoSet (Parser *p)
|
||||
}
|
||||
var = FindVar(DBufValue(&buf), 0);
|
||||
if (var) {
|
||||
nonconst_debug(var->nonconstant, tr("Potential variable assignment considered non-constant because of context"));
|
||||
var->nonconstant = 1;
|
||||
nonconst_debug(!var->is_constant, tr("Potential variable assignment considered non-constant because of context"));
|
||||
var->is_constant = 0;
|
||||
}
|
||||
DBufFree(&buf);
|
||||
return OK;
|
||||
@@ -785,7 +811,7 @@ int DoDump(ParsePtr p)
|
||||
fprintf(ErrFp, "%s ", v->name);
|
||||
PrintValue(&(v->v), ErrFp);
|
||||
if (dump_constness) {
|
||||
if (!v->nonconstant) {
|
||||
if (v->is_constant) {
|
||||
fprintf(ErrFp, " <const>");
|
||||
}
|
||||
}
|
||||
@@ -820,7 +846,7 @@ void DumpVarTable(int dump_constness)
|
||||
fprintf(ErrFp, "%s ", v->name);
|
||||
PrintValue(&(v->v), ErrFp);
|
||||
if (dump_constness) {
|
||||
if (!v->nonconstant) {
|
||||
if (v->is_constant) {
|
||||
fprintf(ErrFp, " <const>");
|
||||
}
|
||||
}
|
||||
@@ -828,6 +854,23 @@ void DumpVarTable(int dump_constness)
|
||||
}
|
||||
}
|
||||
|
||||
void DumpUnusedVars(void)
|
||||
{
|
||||
Var *v;
|
||||
int done_header = 0;
|
||||
|
||||
hash_table_for_each(v, &VHashTbl) {
|
||||
if (v->used_since_set) {
|
||||
continue;
|
||||
}
|
||||
if (!done_header) {
|
||||
fprintf(ErrFp, "%s\n", tr("The following variables were set, but not subsequently used:"));
|
||||
done_header = 1;
|
||||
}
|
||||
fprintf(ErrFp, "\t%s - %s %s:%d\n", v->name, tr("defined at"), v->filename, v->lineno);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DestroyVars */
|
||||
@@ -871,6 +914,8 @@ int PreserveVar(char const *name)
|
||||
v = FindVar(name, 1);
|
||||
if (!v) return E_NO_MEM;
|
||||
v->preserve = 1;
|
||||
/* Assume we're gonna use the variable */
|
||||
v->used_since_set = 1;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -886,11 +931,10 @@ int DoPreserve (Parser *p)
|
||||
DynamicBuffer buf;
|
||||
DBufInit(&buf);
|
||||
|
||||
r = ParseToken(p, &buf);
|
||||
if (r) return r;
|
||||
if (!DBufLen(&buf)) {
|
||||
r = ParseIdentifier(p, &buf);
|
||||
if (r) {
|
||||
DBufFree(&buf);
|
||||
return E_EOLN;
|
||||
return r;
|
||||
}
|
||||
|
||||
r = PreserveVar(DBufValue(&buf));
|
||||
@@ -899,12 +943,14 @@ int DoPreserve (Parser *p)
|
||||
|
||||
/* Keep going... */
|
||||
while(1) {
|
||||
r = ParseToken(p, &buf);
|
||||
if (r) return r;
|
||||
if (!DBufLen(&buf)) {
|
||||
r = ParseIdentifier(p, &buf);
|
||||
if (r == E_EOLN) {
|
||||
DBufFree(&buf);
|
||||
return OK;
|
||||
}
|
||||
if (r) {
|
||||
return r;
|
||||
}
|
||||
r = PreserveVar(DBufValue(&buf));
|
||||
DBufFree(&buf);
|
||||
if (r) return r;
|
||||
|
||||
@@ -65,8 +65,8 @@ FSET not_const(x) x+nonconst(a)
|
||||
REM [const(5)] Jan 1992 MSG expired... should be commented out
|
||||
REM [const(a)] Jan 1992 MSG expired... should be commented out
|
||||
REM [not_const(5)] Jan 1992 MSG nonconstant expression
|
||||
REM [value("a")] Jan 1992 MSG nonconstant expression
|
||||
|
||||
REM [value("a")] Jan 1992 MSG constant expression
|
||||
REM [value("__cabbage", 1)] Jan 1992 MSG non-constant expression
|
||||
IF 0
|
||||
# A comment in a false IF block
|
||||
#!P This should be nuked
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# If you're writing a back-end, test it by feeding it the output
|
||||
# of: remind -pp test-for-backends.rem
|
||||
|
||||
# All back-ends should endeavour to support: WEEK, SHADE, MOON, and
|
||||
# COLOR/COLOUR. They may support other back-end-specific SPECIALs.
|
||||
|
||||
# Color and shade
|
||||
REM 1 SPECIAL COLOR 128 0 0 Red
|
||||
REM 2 SPECIAL COLOUR 0 128 0 British Green
|
||||
@@ -17,11 +20,18 @@ REM [moondate(3)] SPECIAL MOON 3 -1 -1 [moontime(3)]
|
||||
# Week
|
||||
REM Monday SPECIAL WEEK (W[weekno()])
|
||||
|
||||
# PostScript
|
||||
REM Wed PS Border Border 2 div moveto /Helvetica-Oblique findfont 6 scalefont setfont (oof!) show
|
||||
# A normal reminder
|
||||
REM 16 MSG A normal reminder
|
||||
|
||||
# PostScript - currently only supported by rem2ps
|
||||
REM Wed PS Border Border 2 div moveto /Helvetica-Oblique findfont 6 scalefont setfont (oof PostScript!) show
|
||||
|
||||
# A SPECIAL that should be ignored
|
||||
REM 15 SPECIAL RANDOM-STUFF ignore me and be happy
|
||||
|
||||
# A normal reminder
|
||||
REM 16 MSG A normal reminder
|
||||
# HTML - currently only supported by rem2html
|
||||
REM 17 SPECIAL HTML I am <b>bold</b> HTML
|
||||
|
||||
# Pango - currently only supported by rem2pdf
|
||||
REM 18 SPECIAL PANGO I am <b>bold</b> PANGO
|
||||
|
||||
|
||||
@@ -730,8 +730,23 @@ EOF
|
||||
# Test year-folding
|
||||
TZ=America/Toronto ../src/remind -dx ../tests/yearfold.rem >> ../tests/test.out 2>&1
|
||||
|
||||
# Test unused-variable debugging
|
||||
../src/remind -du - <<'EOF' >> ../tests/test.out 2>&1
|
||||
set a 1
|
||||
set b a*2
|
||||
set c "What"
|
||||
if c
|
||||
set d "Told ya!"
|
||||
endif
|
||||
|
||||
set x 44
|
||||
set x 45
|
||||
set y 1000
|
||||
unset y
|
||||
EOF
|
||||
|
||||
# Make sure all the include files are ok
|
||||
find ../include -type f -name '*.rem' | while read x; do ../src/remind -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
|
||||
find ../include -type f -name '*.rem' | while read x; do ../src/remind -du -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
|
||||
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
if [ "$?" = "0" ]; then
|
||||
|
||||
309
tests/test.cmp
309
tests/test.cmp
@@ -428,7 +428,7 @@ Leaving UserFN _i(29, "Adar A", 1991-02-16, 5756) => Invalid Hebrew date
|
||||
|
||||
# This causes a parse error on version 03.01.01
|
||||
REM 1990-01-01 SATISFY 1
|
||||
../tests/test.rem(90): Expired
|
||||
../tests/test.rem(90): Expired: 1990-01-01
|
||||
|
||||
# Test each possible case of the basic reminders.
|
||||
|
||||
@@ -494,7 +494,7 @@ REM May 1992 MSG May 1992
|
||||
../tests/test.rem(121): Trig = Friday, 1 May, 1992
|
||||
|
||||
REM 1 Jan 1991 MSG 1 Jan 1991
|
||||
../tests/test.rem(123): Expired
|
||||
../tests/test.rem(123): Expired: 1991-01-01
|
||||
REM 16 Feb 1991 MSG 16 Feb 1991
|
||||
../tests/test.rem(124): Trig = Saturday, 16 February, 1991
|
||||
16 Feb 1991
|
||||
@@ -800,8 +800,7 @@ Leaving UserFN _ofunc(1991-02-28) => 0
|
||||
../tests/test.rem(224): Trig = Thursday, 28 February, 1991
|
||||
|
||||
# omitfunc ignores local/global omits
|
||||
fset _ofunc(x) 0
|
||||
../tests/test.rem(227): Function `_ofunc' redefined: previously defined at ../tests/test.rem(222)
|
||||
fset - _ofunc(x) 0
|
||||
OMIT 1 March
|
||||
OMIT 2 March 1991
|
||||
REM 1 March OMIT Sun OMITFUNC _ofunc AFTER MSG Should trigger 1 March
|
||||
@@ -1043,7 +1042,7 @@ set a057 value("a05"+"6")
|
||||
"a05" + "6" => "a056"
|
||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
set a058 version()
|
||||
version() => "05.04.00"
|
||||
version() => "05.04.02"
|
||||
set a059 wkday(today())
|
||||
today() => 1991-02-16
|
||||
wkday(1991-02-16) => "Saturday"
|
||||
@@ -2606,7 +2605,7 @@ a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
a007 "1991-02-16"
|
||||
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
a008 "11:44"
|
||||
a058 "05.04.00"
|
||||
a058 "05.04.02"
|
||||
a059 "Saturday"
|
||||
a010 12
|
||||
a060 6
|
||||
@@ -3154,7 +3153,7 @@ REM Mon 1992 UNTIL 1991-01-01 MSG Not diagnosed - not fully-specified start
|
||||
../tests/test.rem(561): Expired
|
||||
REM 1992-01-01 *1 UNTIL 1991-12-31 MSG Diagnosed
|
||||
../tests/test.rem(562): Warning: UNTIL/THROUGH date earlier than start date
|
||||
../tests/test.rem(562): Trig = Wednesday, 1 January, 1992
|
||||
../tests/test.rem(562): Expired
|
||||
set x '1992-01-01'
|
||||
MSG [isconst(x)]
|
||||
../tests/test.rem(564): Trig = Saturday, 16 February, 1991
|
||||
@@ -3165,7 +3164,7 @@ isconst(1992-01-01) => 1
|
||||
REM [x] *1 UNTIL 1991-12-31 MSG Diagnosed
|
||||
x => 1992-01-01
|
||||
../tests/test.rem(565): Warning: UNTIL/THROUGH date earlier than start date
|
||||
../tests/test.rem(565): Trig = Wednesday, 1 January, 1992
|
||||
../tests/test.rem(565): Expired
|
||||
|
||||
set x nonconst('1992-01-01')
|
||||
nonconst(1992-01-01) => 1992-01-01
|
||||
@@ -3177,7 +3176,7 @@ isconst(1992-01-01) => 0
|
||||
|
||||
REM [x] *1 UNTIL 1991-12-31 MSG Not diagnosed - nonconst expression
|
||||
x => 1992-01-01
|
||||
../tests/test.rem(569): Trig = Wednesday, 1 January, 1992
|
||||
../tests/test.rem(569): Expired
|
||||
|
||||
REM MON FROM 1992-01-01 UNTIL 1991-12-31 MSG Diagnosed
|
||||
../tests/test.rem(571): Warning: UNTIL/THROUGH date earlier than FROM date
|
||||
@@ -4116,7 +4115,7 @@ trig("Mon", "Tue", "Wed") => ../tests/test.rem(849): Trig = Monday, 18 February,
|
||||
../tests/test.rem(849): Trig = Tuesday, 19 February, 1991
|
||||
../tests/test.rem(849): Trig = Wednesday, 20 February, 1991
|
||||
1990-01-01
|
||||
../tests/test.rem(849): Expired
|
||||
../tests/test.rem(849): Expired: 1990-01-01
|
||||
|
||||
# Multitrig
|
||||
REM [multitrig("10", "17")] MSG multitrig-1
|
||||
@@ -4152,7 +4151,7 @@ REM [multitrig("15 SCANFROM -7", "14 SCANFROM -7")] MSG multitrig-6
|
||||
multitrig("15 SCANFROM -7", "14 SCANFROM -7") => ../tests/test.rem(857): Trig = Friday, 15 February, 1991
|
||||
../tests/test.rem(857): Trig = Thursday, 14 February, 1991
|
||||
1991-02-14
|
||||
../tests/test.rem(857): Expired
|
||||
../tests/test.rem(857): Expired: 1991-02-14
|
||||
REM [multitrig("15 SCANFROM -7", "14 SCANFROM -7")] SCANFROM -7 MSG multitrig-7
|
||||
multitrig("15 SCANFROM -7", "14 SCANFROM -7") => ../tests/test.rem(858): Trig = Friday, 15 February, 1991
|
||||
../tests/test.rem(858): Trig = Thursday, 14 February, 1991
|
||||
@@ -5076,12 +5075,12 @@ htmlstriptags("<img src=\"foo\">") => ""
|
||||
|
||||
# $ParseUntriggered
|
||||
REM 2 Jan 1990 MSG ["bad_expr" / 2]
|
||||
../tests/test.rem(971): Expired
|
||||
../tests/test.rem(971): Expired: 1990-01-02
|
||||
"bad_expr" / 2 => Type mismatch
|
||||
../tests/test.rem(971): `/': Type mismatch
|
||||
SET $ParseUntriggered 0
|
||||
REM 2 Jan 1990 MSG ["bad_expr" / 2]
|
||||
../tests/test.rem(973): Expired
|
||||
../tests/test.rem(973): Expired: 1990-01-02
|
||||
SET $ParseUntriggered 1
|
||||
|
||||
# String multiplication
|
||||
@@ -5640,8 +5639,8 @@ REM SATISFY ""
|
||||
REM SATISFY [version() > "01.00.00"]
|
||||
../tests/test.rem(1055): SATISFY: expression has no reference to trigdate() or $T...
|
||||
../tests/test.rem(1055): Trig = Saturday, 16 February, 1991
|
||||
version() => "05.04.00"
|
||||
"05.04.00" > "01.00.00" => 1
|
||||
version() => "05.04.02"
|
||||
"05.04.02" > "01.00.00" => 1
|
||||
../tests/test.rem(1055): Trig(satisfied) = Saturday, 16 February, 1991
|
||||
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]
|
||||
../tests/test.rem(1056): SATISFY: expression has no reference to trigdate() or $T...
|
||||
@@ -16363,8 +16362,8 @@ set a monnum("Dec")
|
||||
monnum("Dec") => 12
|
||||
|
||||
set a monnum("not a month")
|
||||
monnum("not a month") => Type mismatch
|
||||
../tests/test.rem(1491): monnum(): Type mismatch
|
||||
monnum("not a month") => Invalid month name
|
||||
../tests/test.rem(1491): monnum(): Invalid month name
|
||||
|
||||
# Test wkdaynum("string")
|
||||
set a wkdaynum("Sun")
|
||||
@@ -16398,8 +16397,8 @@ set a wkdaynum("saturday")
|
||||
wkdaynum("saturday") => 6
|
||||
|
||||
set a wkdaynum("cabbage")
|
||||
wkdaynum("cabbage") => Type mismatch
|
||||
../tests/test.rem(1510): wkdaynum(): Type mismatch
|
||||
wkdaynum("cabbage") => Invalid weekday name
|
||||
../tests/test.rem(1510): wkdaynum(): Invalid weekday name
|
||||
|
||||
# Test non-constant debugging
|
||||
DEBUG +n
|
||||
@@ -16466,10 +16465,14 @@ IF today() < '1990-01-01'
|
||||
../tests/test.rem(1556): Potential variable assignment considered non-constant because of context
|
||||
ENDIF
|
||||
|
||||
dump -c a
|
||||
set b const(today())
|
||||
../tests/test.rem(1559): Non-constant built-in function `today' makes expression non-constant
|
||||
../tests/test.rem(1559): Non-constant expression converted to constant by `const' built-in function
|
||||
dump -c a b
|
||||
Variable Value
|
||||
|
||||
a 1
|
||||
b 1991-02-16 <const>
|
||||
|
||||
DEBUG -n
|
||||
|
||||
@@ -16491,16 +16494,16 @@ Variable Value
|
||||
|
||||
a 1991-02-17
|
||||
set a eval("1 +")
|
||||
eval("1 +") => ../tests/test.rem(1569): Unexpected end of line
|
||||
eval("1 +") => ../tests/test.rem(1570): Unexpected end of line
|
||||
1 +
|
||||
^-- here
|
||||
Unexpected end of line
|
||||
set a eval("1/0")
|
||||
eval("1/0") => 1 / 0 => Division by zero
|
||||
../tests/test.rem(1570): `/': Division by zero
|
||||
../tests/test.rem(1571): `/': Division by zero
|
||||
Division by zero
|
||||
set a eval("1 / / 2")
|
||||
eval("1 / / 2") => ../tests/test.rem(1571): Illegal character `/'
|
||||
eval("1 / / 2") => ../tests/test.rem(1572): Illegal character `/'
|
||||
1 / / 2
|
||||
^-- here
|
||||
Illegal character
|
||||
@@ -16514,12 +16517,95 @@ catch(*Division by zero*, 34) => 34
|
||||
set a catch(eval("1 / / 2"), 35)
|
||||
eval("1 / / 2") => Illegal character
|
||||
catch(*Illegal character*, 35) => 35
|
||||
|
||||
# Ensure RUN is disabled in eval
|
||||
set a shell("echo foo")
|
||||
shell("echo foo") => "foo"
|
||||
set a eval("shell(\"echo foo\")")
|
||||
eval("shell(\"echo foo\")") => shell("echo foo") => RUN disabled
|
||||
../tests/test.rem(1579): shell(): RUN disabled
|
||||
RUN disabled
|
||||
set a shell("echo foo")
|
||||
shell("echo foo") => "foo"
|
||||
|
||||
FSET i() shell("echo foo")
|
||||
set a i()
|
||||
Entering UserFN i()
|
||||
shell("echo foo") => "foo"
|
||||
Leaving UserFN i() => "foo"
|
||||
set a eval("i()")
|
||||
eval("i()") => Entering UserFN i()
|
||||
shell("echo foo") => RUN disabled
|
||||
../tests/test.rem(1584): shell(): RUN disabled
|
||||
../tests/test.rem(1582): [#0] In function `i'
|
||||
Leaving UserFN i() => RUN disabled
|
||||
RUN disabled
|
||||
set a i()
|
||||
Entering UserFN i()
|
||||
shell("echo foo") => "foo"
|
||||
Leaving UserFN i() => "foo"
|
||||
FUNSET i
|
||||
set a "eval(\"1\")+ shell(\"ls\")"
|
||||
set b eval(a)
|
||||
a => "eval(\"1\")+ shell(\"ls\")"
|
||||
eval("eval(\"1\")+ shell(\"ls\")") => eval("1") => 1
|
||||
shell("ls") => RUN disabled
|
||||
../tests/test.rem(1588): shell(): RUN disabled
|
||||
RUN disabled
|
||||
|
||||
# "value" should use lazy evaluation
|
||||
set a value(4:33)
|
||||
value(04:33) => Type mismatch
|
||||
../tests/test.rem(1591): Type mismatch
|
||||
set a value('2020-01-01', 42)
|
||||
value(2020-01-01, ?) => Type mismatch
|
||||
../tests/test.rem(1592): Type mismatch
|
||||
set a value("nosuchvar")
|
||||
value("nosuchvar") => Undefined variable
|
||||
../tests/test.rem(1593): Undefined variable
|
||||
set a value("nosuchvar", 42)
|
||||
value("nosuchvar", 42) => 42
|
||||
set a value("a", 42)
|
||||
value("a", ?) => 42
|
||||
set a value("a")
|
||||
value("a") => 42
|
||||
DEBUG -x
|
||||
|
||||
DEBUG -e
|
||||
../tests/test.rem(1581): eval(): Too many recursive function calls
|
||||
../tests/test.rem(1603): eval(): Too many recursive function calls
|
||||
Base: 1991-02-09
|
||||
Base: 1991-02-09
|
||||
../tests/test.rem(1611): Expired
|
||||
../tests/test.rem(1612): Expired
|
||||
trigvalid = 1; trigdate = 1991-01-14
|
||||
trigvalid = 0; trigdate = 0
|
||||
daysinmon(2, 2000) => 29
|
||||
daysinmon(2, 2001) => 28
|
||||
daysinmon(3, 2000) => 31
|
||||
daysinmon(3, 2001) => 31
|
||||
daysinmon("Feb", 2000) => 29
|
||||
daysinmon("Feb", 2001) => 28
|
||||
daysinmon("March", 2000) => 31
|
||||
daysinmon("March", 2001) => 31
|
||||
daysinmon("Cabbage", 2001) => Invalid month name
|
||||
../tests/test.rem(1639): daysinmon(): Invalid month name
|
||||
daysinmon(2000-02-14) => 29
|
||||
daysinmon(2001-02-14) => 28
|
||||
daysinmon(2000-04-14) => 30
|
||||
daysinmon(2001-04-14) => 30
|
||||
date(2020, "April", 15) => 2020-04-15
|
||||
date(2020, "Carrot", 12) => Invalid month name
|
||||
../tests/test.rem(1647): date(): Invalid month name
|
||||
datetime(2020, "April", 13, 04:44) => 2020-04-13@04:44
|
||||
datetime(2020, "April", 13, 4, 44) => 2020-04-13@04:44
|
||||
datetime(2020, "Lettuce", 13, 04:44) => Invalid month name
|
||||
../tests/test.rem(1650): datetime(): Invalid month name
|
||||
datetime(2020, "Lettuce", 13, 4, 44) => Invalid month name
|
||||
../tests/test.rem(1651): datetime(): Invalid month name
|
||||
wkdaynum("Tue") => 2
|
||||
wkdaynum("Wednesday") => 3
|
||||
wkdaynum("telephone") => Invalid weekday name
|
||||
../tests/test.rem(1655): wkdaynum(): Invalid weekday name
|
||||
Variable hash table statistics:
|
||||
Entries: 100143; Buckets: 87719; Non-empty Buckets: 66301
|
||||
Maxlen: 5; Minlen: 0; Avglen: 1.142; Stddev: 0.878; Avg nonempty len: 1.510
|
||||
@@ -18922,10 +19008,10 @@ September 30
|
||||
2007/08/16 * * * * Should be included by 02.rem
|
||||
# rem2ps end
|
||||
Feb 29 Bug Test
|
||||
-(1): Trig = Sunday, 3 March, 2024
|
||||
-stdin-(1): Trig = Sunday, 3 March, 2024
|
||||
No reminders.
|
||||
Mon 31 Dec Bug Test
|
||||
-(1): Expired
|
||||
-stdin-(1): Expired
|
||||
No reminders.
|
||||
Color Test
|
||||
(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk(B
|
||||
@@ -20237,7 +20323,7 @@ Hi
|
||||
How are you?
|
||||
OK
|
||||
MON WKDAY DAY across year test
|
||||
-(1): Trig = Monday, 3 January, 2000
|
||||
-stdin-(1): Trig = Monday, 3 January, 2000
|
||||
No reminders.
|
||||
Sort Test
|
||||
Reminders for Saturday, 1st January, 2000:
|
||||
@@ -20253,6 +20339,7 @@ Timed
|
||||
Untimed
|
||||
|
||||
Purge Test
|
||||
../tests/purge_dir/f3.rem(62): Attempt to redefine built-in function: `const'
|
||||
../tests/purge_dir/f3.rem(76): `/': Division by zero
|
||||
../tests/purge_dir/f3.rem(76): `/': Division by zero
|
||||
F1
|
||||
@@ -20358,10 +20445,11 @@ FSET not_const(x) x+nonconst(a)
|
||||
#!P: Next line may have expired, but contains non-constant expression
|
||||
#!P: or a relative SCANFROM clause
|
||||
REM [not_const(5)] Jan 1992 MSG nonconstant expression
|
||||
#!P: Next line has expired, but contains expression... please verify
|
||||
#!P: Expired: REM [value("a")] Jan 1992 MSG constant expression
|
||||
#!P: Next line may have expired, but contains non-constant expression
|
||||
#!P: or a relative SCANFROM clause
|
||||
REM [value("a")] Jan 1992 MSG nonconstant expression
|
||||
|
||||
REM [value("__cabbage", 1)] Jan 1992 MSG non-constant expression
|
||||
#!P: The next IF evaluated false...
|
||||
#!P: REM statements in IF block not checked for purging.
|
||||
IF 0
|
||||
@@ -20475,8 +20563,8 @@ FSET not_const(x) x+nonconst(a)
|
||||
#!P: Expired: REM [const(5)] Jan 1992 MSG expired... should be commented out
|
||||
#!P: Expired: REM [const(a)] Jan 1992 MSG expired... should be commented out
|
||||
REM [not_const(5)] Jan 1992 MSG nonconstant expression
|
||||
REM [value("a")] Jan 1992 MSG nonconstant expression
|
||||
|
||||
#!P: Expired: REM [value("a")] Jan 1992 MSG constant expression
|
||||
REM [value("__cabbage", 1)] Jan 1992 MSG non-constant expression
|
||||
IF 0
|
||||
# A comment in a false IF block
|
||||
ENDIF
|
||||
@@ -22763,11 +22851,11 @@ January 2012 31 0 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
December 31
|
||||
February 29
|
||||
{"date":"2012-01-02","filename":"-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-09","filename":"-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-16","filename":"-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-23","filename":"-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-30","filename":"-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-02","filename":"-stdin-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-09","filename":"-stdin-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-16","filename":"-stdin-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-23","filename":"-stdin-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
{"date":"2012-01-30","filename":"-stdin-","lineno":1,"wd":["Monday"],"priority":5000,"omitfunc":"foo","nonconst_expr":1,"body":"bar"}
|
||||
# rem2ps2 end
|
||||
-stdin-(8:9): Number too high
|
||||
-stdin-(8:9): Number too high
|
||||
@@ -22804,9 +22892,9 @@ February 29
|
||||
[
|
||||
{
|
||||
"translations":{"LANGID":"en"},"caltype":"monthly","monthname":"January","year":2012,"daysinmonth":31,"firstwkday":0,"mondayfirst":0,"daynames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"prevmonthname":"December","daysinprevmonth":31,"prevmonthyear":2011,"nextmonthname":"February","daysinnextmonth":29,"nextmonthyear":2012,"entries":[
|
||||
{"date":"2012-01-02","filename":"-","lineno":1,"d":2,"priority":5000,"body":"Normal"},
|
||||
{"date":"2012-01-03","filename":"-","lineno":4,"lineno_start":3,"passthru":"COLOR","d":3,"priority":5000,"r":255,"g":0,"b":0,"rawbody":"%\"Red%\" on the calendar!","calendar_body":"Red","plain_body":"Red on the calendar!","body":"255 0 0 %\"Red%\" on the calendar!"},
|
||||
{"date":"2012-01-04","filename":"-","lineno":6,"d":4,"priority":5000,"body":"Normal"}
|
||||
{"date":"2012-01-02","filename":"-stdin-","lineno":1,"d":2,"priority":5000,"body":"Normal"},
|
||||
{"date":"2012-01-03","filename":"-stdin-","lineno":4,"lineno_start":3,"passthru":"COLOR","d":3,"priority":5000,"r":255,"g":0,"b":0,"rawbody":"%\"Red%\" on the calendar!","calendar_body":"Red","plain_body":"Red on the calendar!","body":"255 0 0 %\"Red%\" on the calendar!"},
|
||||
{"date":"2012-01-04","filename":"-stdin-","lineno":6,"d":4,"priority":5000,"body":"Normal"}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -23580,7 +23668,7 @@ SECURITY: Won't read world-writable file or directory!
|
||||
Error reading include_dir/ww: Can't open file
|
||||
SECURITY: Won't read world-writable file or directory!
|
||||
Error reading include_dir/ww: No files matching *.rem
|
||||
05.04.00
|
||||
05.04.02
|
||||
Enabling test mode: This is meant for the acceptance test.
|
||||
Do not use --test in production.
|
||||
In test mode, the system time is fixed at 2025-01-06@19:00
|
||||
@@ -23593,72 +23681,72 @@ In test mode, the system time is fixed at 2025-01-06@19:00
|
||||
{"response":"queue","queue":[{"priority":2,"eventstart":"2025-01-06T23:59","time":"23:59","nexttime":"23:59","tdelta":0,"trep":0,"qid":"42424242","rundisabled":0,"ntrig":1,"filename":"../tests/queue2.rem","lineno":1,"type":"MSG_TYPE","body":"XXXX"},{"priority":999,"eventstart":"2025-01-06T23:58","info":{"info2":"Nope","info3":"heh"},"time":"23:58","nexttime":"23:58","tdelta":0,"trep":0,"qid":"42424242","rundisabled":0,"ntrig":1,"filename":"../tests/queue1.rem","lineno":5,"type":"MSG_TYPE","body":"quux"},{"priority":42,"eventstart":"2025-01-06T23:57","info":{"info":"yuppers"},"time":"23:57","nexttime":"23:57","tdelta":0,"trep":0,"qid":"42424242","rundisabled":0,"ntrig":1,"filename":"../tests/queue1.rem","lineno":4,"type":"MSG_TYPE","body":"bar"},{"priority":5000,"eventstart":"2025-01-06T23:56","time":"23:56","nexttime":"23:56","tdelta":0,"trep":0,"qid":"42424242","rundisabled":0,"ntrig":1,"filename":"../tests/queue1.rem","lineno":3,"type":"MSG_TYPE","body":"foo"}],"command":"QUEUE"}
|
||||
BANNER %
|
||||
REM 29 MSG One
|
||||
-(2): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(2): Trig = Thursday, 29 February, 2024
|
||||
REM 29 Feb MSG two
|
||||
-(3): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(3): Trig = Thursday, 29 February, 2024
|
||||
REM 29 2024 MSG three
|
||||
-(4): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(4): Trig = Thursday, 29 February, 2024
|
||||
REM 29 Feb 2024 MSG four
|
||||
-(5): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(5): Trig = Thursday, 29 February, 2024
|
||||
REM Thursday 29 MSG One
|
||||
-(6): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(6): Trig = Thursday, 29 February, 2024
|
||||
REM Thursday 29 Feb MSG two
|
||||
-(7): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(7): Trig = Thursday, 29 February, 2024
|
||||
REM Thursday 29 2024 MSG three
|
||||
-(8): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(8): Trig = Thursday, 29 February, 2024
|
||||
REM Thursday 29 Feb 2024 MSG four
|
||||
-(9): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(9): Trig = Thursday, 29 February, 2024
|
||||
REM Wednesday 29 MSG One
|
||||
-(10): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(10): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 Feb MSG two
|
||||
-(11): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(11): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 2024 MSG three
|
||||
-(12): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(12): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 Feb 2024 MSG four
|
||||
-(13): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(13): Trig = Wednesday, 6 March, 2024
|
||||
REM Friday 29 MSG One
|
||||
-(14): Trig = Friday, 1 March, 2024
|
||||
-stdin-(14): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 Feb MSG two
|
||||
-(15): Trig = Friday, 1 March, 2024
|
||||
-stdin-(15): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 2024 MSG three
|
||||
-(16): Trig = Friday, 1 March, 2024
|
||||
-stdin-(16): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 Feb 2024 MSG four
|
||||
-(17): Trig = Friday, 1 March, 2024
|
||||
-stdin-(17): Trig = Friday, 1 March, 2024
|
||||
|
||||
No reminders.
|
||||
BANNER %
|
||||
REM 29 MSG One
|
||||
-(2): Trig = Friday, 29 March, 2024
|
||||
-stdin-(2): Trig = Friday, 29 March, 2024
|
||||
REM 29 Feb MSG two
|
||||
-(3): Trig = Tuesday, 29 February, 2028
|
||||
-stdin-(3): Trig = Tuesday, 29 February, 2028
|
||||
REM 29 2024 MSG three
|
||||
-(4): Trig = Friday, 29 March, 2024
|
||||
-stdin-(4): Trig = Friday, 29 March, 2024
|
||||
REM 29 Feb 2024 MSG four
|
||||
-(5): Expired
|
||||
-stdin-(5): Expired: 2024-02-29
|
||||
REM Thursday 29 MSG One
|
||||
-(6): Trig = Thursday, 4 April, 2024
|
||||
-stdin-(6): Trig = Thursday, 4 April, 2024
|
||||
REM Thursday 29 Feb MSG two
|
||||
-(7): Trig = Thursday, 2 March, 2028
|
||||
-stdin-(7): Trig = Thursday, 2 March, 2028
|
||||
REM Thursday 29 2024 MSG three
|
||||
-(8): Trig = Thursday, 4 April, 2024
|
||||
-stdin-(8): Trig = Thursday, 4 April, 2024
|
||||
REM Thursday 29 Feb 2024 MSG four
|
||||
-(9): Expired
|
||||
-stdin-(9): Expired: 2024-02-29
|
||||
REM Wednesday 29 MSG One
|
||||
-(10): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(10): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 Feb MSG two
|
||||
-(11): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(11): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 2024 MSG three
|
||||
-(12): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(12): Trig = Wednesday, 6 March, 2024
|
||||
REM Wednesday 29 Feb 2024 MSG four
|
||||
-(13): Trig = Wednesday, 6 March, 2024
|
||||
-stdin-(13): Trig = Wednesday, 6 March, 2024
|
||||
REM Friday 29 MSG One
|
||||
-(14): Trig = Friday, 1 March, 2024
|
||||
-stdin-(14): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 Feb MSG two
|
||||
-(15): Trig = Friday, 1 March, 2024
|
||||
-stdin-(15): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 2024 MSG three
|
||||
-(16): Trig = Friday, 1 March, 2024
|
||||
-stdin-(16): Trig = Friday, 1 March, 2024
|
||||
REM Friday 29 Feb 2024 MSG four
|
||||
-(17): Trig = Friday, 1 March, 2024
|
||||
-stdin-(17): Trig = Friday, 1 March, 2024
|
||||
|
||||
One
|
||||
|
||||
@@ -23670,75 +23758,75 @@ four
|
||||
|
||||
BANNER %
|
||||
REM 29 MSG One
|
||||
-(2): Trig = Saturday, 29 March, 2025
|
||||
-stdin-(2): Trig = Saturday, 29 March, 2025
|
||||
REM 29 Feb MSG two
|
||||
-(3): Trig = Tuesday, 29 February, 2028
|
||||
-stdin-(3): Trig = Tuesday, 29 February, 2028
|
||||
REM 29 2025 MSG three
|
||||
-(4): Trig = Saturday, 29 March, 2025
|
||||
-stdin-(4): Trig = Saturday, 29 March, 2025
|
||||
REM 29 Feb 2025 MSG four
|
||||
-stdin-(5): Bad date specification
|
||||
REM Thursday 29 MSG One
|
||||
-(6): Trig = Thursday, 3 April, 2025
|
||||
-stdin-(6): Trig = Thursday, 3 April, 2025
|
||||
REM Thursday 29 Feb MSG two
|
||||
-(7): Trig = Thursday, 2 March, 2028
|
||||
-stdin-(7): Trig = Thursday, 2 March, 2028
|
||||
REM Thursday 29 2025 MSG three
|
||||
-(8): Trig = Thursday, 3 April, 2025
|
||||
-stdin-(8): Trig = Thursday, 3 April, 2025
|
||||
REM Thursday 29 Feb 2025 MSG four
|
||||
-stdin-(9): Bad date specification
|
||||
REM Wednesday 29 MSG One
|
||||
-(10): Trig = Wednesday, 2 April, 2025
|
||||
-stdin-(10): Trig = Wednesday, 2 April, 2025
|
||||
REM Wednesday 29 Feb MSG two
|
||||
-(11): Trig = Wednesday, 1 March, 2028
|
||||
-stdin-(11): Trig = Wednesday, 1 March, 2028
|
||||
REM Wednesday 29 2025 MSG three
|
||||
-(12): Trig = Wednesday, 2 April, 2025
|
||||
-stdin-(12): Trig = Wednesday, 2 April, 2025
|
||||
REM Wednesday 29 Feb 2025 MSG four
|
||||
-stdin-(13): Bad date specification
|
||||
REM Friday 29 MSG One
|
||||
-(14): Trig = Friday, 4 April, 2025
|
||||
-stdin-(14): Trig = Friday, 4 April, 2025
|
||||
REM Friday 29 Feb MSG two
|
||||
-(15): Trig = Friday, 3 March, 2028
|
||||
-stdin-(15): Trig = Friday, 3 March, 2028
|
||||
REM Friday 29 2025 MSG three
|
||||
-(16): Trig = Friday, 4 April, 2025
|
||||
-stdin-(16): Trig = Friday, 4 April, 2025
|
||||
REM Friday 29 Feb 2025 MSG four
|
||||
-stdin-(17): Bad date specification
|
||||
|
||||
No reminders.
|
||||
BANNER %
|
||||
REM 29 MSG One
|
||||
-(2): Trig = Saturday, 29 March, 2025
|
||||
-stdin-(2): Trig = Saturday, 29 March, 2025
|
||||
REM 29 Feb MSG two
|
||||
-(3): Trig = Tuesday, 29 February, 2028
|
||||
-stdin-(3): Trig = Tuesday, 29 February, 2028
|
||||
REM 29 2025 MSG three
|
||||
-(4): Trig = Saturday, 29 March, 2025
|
||||
-stdin-(4): Trig = Saturday, 29 March, 2025
|
||||
REM 29 Feb 2025 MSG four
|
||||
-stdin-(5): Bad date specification
|
||||
REM Thursday 29 MSG One
|
||||
-(6): Trig = Thursday, 3 April, 2025
|
||||
-stdin-(6): Trig = Thursday, 3 April, 2025
|
||||
REM Thursday 29 Feb MSG two
|
||||
-(7): Trig = Thursday, 2 March, 2028
|
||||
-stdin-(7): Trig = Thursday, 2 March, 2028
|
||||
REM Thursday 29 2025 MSG three
|
||||
-(8): Trig = Thursday, 3 April, 2025
|
||||
-stdin-(8): Trig = Thursday, 3 April, 2025
|
||||
REM Thursday 29 Feb 2025 MSG four
|
||||
-stdin-(9): Bad date specification
|
||||
REM Wednesday 29 MSG One
|
||||
-(10): Trig = Wednesday, 2 April, 2025
|
||||
-stdin-(10): Trig = Wednesday, 2 April, 2025
|
||||
REM Wednesday 29 Feb MSG two
|
||||
-(11): Trig = Wednesday, 1 March, 2028
|
||||
-stdin-(11): Trig = Wednesday, 1 March, 2028
|
||||
REM Wednesday 29 2025 MSG three
|
||||
-(12): Trig = Wednesday, 2 April, 2025
|
||||
-stdin-(12): Trig = Wednesday, 2 April, 2025
|
||||
REM Wednesday 29 Feb 2025 MSG four
|
||||
-stdin-(13): Bad date specification
|
||||
REM Friday 29 MSG One
|
||||
-(14): Trig = Friday, 4 April, 2025
|
||||
-stdin-(14): Trig = Friday, 4 April, 2025
|
||||
REM Friday 29 Feb MSG two
|
||||
-(15): Trig = Friday, 3 March, 2028
|
||||
-stdin-(15): Trig = Friday, 3 March, 2028
|
||||
REM Friday 29 2025 MSG three
|
||||
-(16): Trig = Friday, 4 April, 2025
|
||||
-stdin-(16): Trig = Friday, 4 April, 2025
|
||||
REM Friday 29 Feb 2025 MSG four
|
||||
-stdin-(17): Bad date specification
|
||||
|
||||
No reminders.
|
||||
-(2): Trig = Thursday, 29 February, 2024
|
||||
-stdin-(2): Trig = Thursday, 29 February, 2024
|
||||
No bug
|
||||
|
||||
Variable Value
|
||||
@@ -24156,7 +24244,7 @@ Translation hash table statistics:
|
||||
Expression nodes high-water: 499
|
||||
Expression nodes leaked: 0
|
||||
Parse level high-water: 2001
|
||||
-stdin-(14): Unmatched PUSH-OMIT-CONTEXT at -(7)
|
||||
-stdin-(14): Unmatched PUSH-OMIT-CONTEXT at -stdin-(7)
|
||||
-stdin-(14): Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT
|
||||
No reminders.
|
||||
../tests/if2.rem(6): Warning: Missing ENDIF
|
||||
@@ -24460,6 +24548,7 @@ char
|
||||
choose
|
||||
coerce
|
||||
columns
|
||||
const
|
||||
current
|
||||
date
|
||||
datepart
|
||||
@@ -24784,10 +24873,11 @@ TRANSLATE "Ok" ""
|
||||
TRANSLATE "Missing ']'" ""
|
||||
TRANSLATE "Missing quote" ""
|
||||
TRANSLATE "Expression too complex" ""
|
||||
TRANSLATE "Invalid month name" ""
|
||||
TRANSLATE "Missing ')'" ""
|
||||
TRANSLATE "Undefined function" ""
|
||||
TRANSLATE "Illegal character" ""
|
||||
TRANSLATE "Expecting binary operator" ""
|
||||
TRANSLATE "Invalid weekday name" ""
|
||||
TRANSLATE "Out of memory" ""
|
||||
TRANSLATE "Ill-formed number" ""
|
||||
TRANSLATE "Can't coerce" ""
|
||||
@@ -24912,6 +25002,8 @@ TRANSLATE "Missing REM type; assuming MSG" ""
|
||||
TRANSLATE "No Adar A in %d" ""
|
||||
TRANSLATE "No substition function `%s' defined" ""
|
||||
TRANSLATE "Non-constant built-in function `%s' makes expression non-constant" ""
|
||||
TRANSLATE "Non-constant expression converted to constant by `const' built-in function" ""
|
||||
TRANSLATE "Nonexistence of global variable `%s' makes value() non-constant" ""
|
||||
TRANSLATE "Not setting $OnceFile: Already processed a reminder with a ONCE clause" ""
|
||||
TRANSLATE "OMIT: UNTIL not allowed; did you mean THROUGH?" ""
|
||||
TRANSLATE "OMITFUNC counts as a non-constant expression" ""
|
||||
@@ -24930,6 +25022,7 @@ TRANSLATE "SECURITY: Won't read non-root-owned file or directory when running as
|
||||
TRANSLATE "SECURITY: Won't read world-writable file or directory!" ""
|
||||
TRANSLATE "Scanning directory `%s' for *.rem files" ""
|
||||
TRANSLATE "System variable `$%s' makes expression non-constant" ""
|
||||
TRANSLATE "The following variables were set, but not subsequently used:" ""
|
||||
TRANSLATE "Undefined %s function: `%s'" ""
|
||||
TRANSLATE "Unmatched PUSH-OMIT-CONTEXT at %s(%d)" ""
|
||||
TRANSLATE "Unrecognized command; interpreting as REM" ""
|
||||
@@ -24950,6 +25043,9 @@ TRANSLATE "Warning: Variable name `%.*s...' truncated to `%.*s'" ""
|
||||
TRANSLATE "You have OMITted everything! The space-time continuum is at risk." ""
|
||||
TRANSLATE "\\x00 is not a valid escape sequence" ""
|
||||
TRANSLATE "`%%%c' substitution sequence should not be used without an AT clause" ""
|
||||
TRANSLATE "`%s' UNSET without being used (previous SET: %s:%d)" ""
|
||||
TRANSLATE "`%s' re-SET without being used (previous SET: %s:%d)" ""
|
||||
TRANSLATE "defined at" ""
|
||||
TRANSLATE "did you mean" ""
|
||||
TRANSLATE "here" ""
|
||||
TRANSLATE "psmoon() is deprecated; use SPECIAL MOON instead." ""
|
||||
@@ -25063,10 +25159,10 @@ February 2024 29 4 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
January 31
|
||||
March 31
|
||||
{"date":"2024-02-07","filename":"-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-14","filename":"-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-21","filename":"-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-28","filename":"-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-07","filename":"-stdin-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-14","filename":"-stdin-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-21","filename":"-stdin-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
{"date":"2024-02-28","filename":"-stdin-","lineno":1,"info":{"location":"here","summary":"Nope"},"wd":["Wednesday"],"priority":5000,"rawbody":"Meeting [triginfo(\"location\")] %<summary> %<nonexist> [triginfo(\"cabbage\")]","body":"Meeting here Nope "}
|
||||
# rem2ps2 end
|
||||
-stdin-(1): Invalid INFO string: Must be of the form "Header: Value"
|
||||
-stdin-(2): Invalid INFO string: Must be of the form "Header: Value"
|
||||
@@ -38671,3 +38767,10 @@ utctolocal(2050-03-13@05:00) => 2050-03-13@00:00
|
||||
utctolocal(2050-11-06@04:00) => 2050-11-06@00:00
|
||||
utctolocal(2050-11-06@07:00) => 2050-11-06@02:00
|
||||
No reminders.
|
||||
-stdin-(9): `x' re-SET without being used (previous SET: -stdin-:8)
|
||||
-stdin-(11): `y' UNSET without being used (previous SET: -stdin-:10)
|
||||
The following variables were set, but not subsequently used:
|
||||
b - defined at -stdin-:2
|
||||
x - defined at -stdin-:9
|
||||
d - defined at -stdin-:5
|
||||
No reminders.
|
||||
|
||||
@@ -224,7 +224,7 @@ REM 1 March OMITFUNC _ofunc AFTER MSG OmitFunc Test
|
||||
REM 8 March OMITFUNC _ofunc -1 MSG OmitFunc Test 2
|
||||
|
||||
# omitfunc ignores local/global omits
|
||||
fset _ofunc(x) 0
|
||||
fset - _ofunc(x) 0
|
||||
OMIT 1 March
|
||||
OMIT 2 March 1991
|
||||
REM 1 March OMIT Sun OMITFUNC _ofunc AFTER MSG Should trigger 1 March
|
||||
@@ -1556,7 +1556,8 @@ IF today() < '1990-01-01'
|
||||
SET a 2
|
||||
ENDIF
|
||||
|
||||
dump -c a
|
||||
set b const(today())
|
||||
dump -c a b
|
||||
|
||||
DEBUG -n
|
||||
|
||||
@@ -1572,6 +1573,27 @@ set a eval("1 / / 2")
|
||||
set a catch(eval("1 +"), 33)
|
||||
set a catch(eval("1/0"), 34)
|
||||
set a catch(eval("1 / / 2"), 35)
|
||||
|
||||
# Ensure RUN is disabled in eval
|
||||
set a shell("echo foo")
|
||||
set a eval("shell(\"echo foo\")")
|
||||
set a shell("echo foo")
|
||||
|
||||
FSET i() shell("echo foo")
|
||||
set a i()
|
||||
set a eval("i()")
|
||||
set a i()
|
||||
FUNSET i
|
||||
set a "eval(\"1\")+ shell(\"ls\")"
|
||||
set b eval(a)
|
||||
|
||||
# "value" should use lazy evaluation
|
||||
set a value(4:33)
|
||||
set a value('2020-01-01', 42)
|
||||
set a value("nosuchvar")
|
||||
set a value("nosuchvar", 42)
|
||||
set a value("a", 42)
|
||||
set a value("a")
|
||||
DEBUG -x
|
||||
|
||||
DEBUG -e
|
||||
@@ -1584,6 +1606,55 @@ set a eval(a)
|
||||
REM 9 Feb 1991 *7 MSG Base: [trigbase()]
|
||||
REM 9 Feb 1991 *1 MSG Base: [$Tb]
|
||||
|
||||
# The UNTIL bug
|
||||
DEBUG +t
|
||||
REM SECOND SATURDAY +300 UNTIL 1991-02-02 MSG [$T]
|
||||
REM SECOND SATURDAY +300 UNTIL 1991-02-16 MSG [$T]
|
||||
DEBUG -t
|
||||
|
||||
# Fully-specified trigger date in the past
|
||||
REM 14 Jan 1991 MSG In the past
|
||||
set a trigvalid()
|
||||
set b trigdate()
|
||||
|
||||
REM MSG trigvalid = [a]; trigdate = [b]
|
||||
|
||||
# SATISFY clause that's never satisfied...
|
||||
REM 14 Jan 1991 SATISFY [$Ty == 2022] MSG I can't get no satisfaction
|
||||
set a trigvalid()
|
||||
set b trigdate()
|
||||
|
||||
REM MSG trigvalid = [a]; trigdate = [b]
|
||||
|
||||
DEBUG +x
|
||||
set a daysinmon(2, 2000)
|
||||
set a daysinmon(2, 2001)
|
||||
set a daysinmon(3, 2000)
|
||||
set a daysinmon(3, 2001)
|
||||
|
||||
set a daysinmon("Feb", 2000)
|
||||
set a daysinmon("Feb", 2001)
|
||||
set a daysinmon("March", 2000)
|
||||
set a daysinmon("March", 2001)
|
||||
set a daysinmon("Cabbage", 2001)
|
||||
|
||||
set a daysinmon('2000-02-14')
|
||||
set a daysinmon('2001-02-14')
|
||||
set a daysinmon('2000-04-14')
|
||||
set a daysinmon('2001-04-14')
|
||||
|
||||
set a date(2020, "April", 15)
|
||||
set a date(2020, "Carrot", 12)
|
||||
set a datetime(2020, "April", 13, 4:44)
|
||||
set a datetime(2020, "April", 13, 4, 44)
|
||||
set a datetime(2020, "Lettuce", 13, 4:44)
|
||||
set a datetime(2020, "Lettuce", 13, 4, 44)
|
||||
|
||||
set a wkdaynum("Tue")
|
||||
set a wkdaynum("Wednesday")
|
||||
set a wkdaynum("telephone")
|
||||
|
||||
DEBUG -x
|
||||
# Output expression-node stats
|
||||
DEBUG +h
|
||||
|
||||
|
||||
Reference in New Issue
Block a user