[Remind-Fans] Error: "Date Overflow" In Complicated Recipie
Porcelain Mouse
pmouse-support at nobig5.com
Mon Oct 2 02:11:36 EDT 2023
Hi Remind Fans,
Sorry to bother you. Recently, wyrd and remind have decided there is a
problem with a REMIND file that I've had for a long time. I didn't write
any of these myself; it's all stuff I found. I cannot tell what's wrong,
but as I say, I don't write anything this complicated, myself, so maybe
there is a bug. But, I really don't understand what has changed; it
wasn't complaining a few weeks ago. On the other hand, I think I may have
seen this error before; it just didn't stick around. Like maybe it
depends on the current day? I rebuilt wyrd & remind just now to the
latest release versions, but that had no effect on this error.
Here is the error:
Error in reminders file: "/home/pdestefa/.reminders.holidays(114): `-': Date overflow"
Here is a part of the reminders file:
76 # Handy function to provide SCANFROM dates...
77 FSET _back(days) TRIGGER(TODAY()-days)
78
79 #############################################################################
80 # Here's a tricky problem: The 4th of July is a holiday in the U.S.
81 # However, if it falls on a Saturday, the previous Friday is a holiday.
82 # If it falls on a Sunday, the next Monday is a holiday. Here's how
83 # to do it. NOTE that the following procedure makes the OMIT context
84 # dependent upon the current date. SInce it only depends on the current
85 # year, which is not likely to change while producing a calendar, we
86 # are fairly safe. However, reminders with huge DELTA or BACK components
87 # may not operate as expected. In general, any time you make OMIT
88 # dependent upon the current date, it's tricky and results may not be
89 # what you expect. You should try to make sure that the OMIT context
90 # "near" any current reminders will not change during a calendar run.
91 # The SCANFROM clause should help make these OMITs very safe.
92 ############################################################################
93
94 # Calculate the weekday of the July 4th US holiday.
95 REM 4 July SCANFROM [_back(7)] SATISFY 1
96
97 IF WKDAYNUM(TRIGDATE()) == Sat
98 REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
99 OMIT [TRIGGER(TRIGDATE()-1)] MSG Independence day (observed)
100 ELSE
101 IF WKDAYNUM(TRIGDATE()) == Sun
102 REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
103 OMIT [TRIGGER(TRIGDATE()+1)] MSG Independence day (observed)
104 ELSE
105 OMIT [TRIGGER(TRIGDATE())] MSG Independence day
106 ENDIF
107 ENDIF
108
109 #Same for Veterans Day
110 REM 11 November SCANFROM [_back(7)] SATISFY 1
111
112 IF WKDAYNUM(TRIGDATE()) == Sat
113 REM [TRIGGER(TRIGDATE())] MSG Veterans day (actual)
114 OMIT [TRIGGER(TRIGDATE()-1)] MSG Veterans day (observed)
115 ELSE
116 IF WKDAYNUM(TRIGDATE()) == Sun
117 REM [TRIGGER(TRIGDATE())] MSG Veterans day (actual)
118 OMIT [TRIGGER(TRIGDATE()+1)] MSG Veterans day (observed)
119 ELSE
120 REM [TRIGGER(TRIGDATE())] MSG Veterans day
121 ENDIF
122 ENDIF
Thanks for you help in advance,
--
PMouse
More information about the Remind-fans
mailing list