[Remind-Fans] OMIT and THROUGH for every year

Ian! D. Allen idallen at idallen.ca
Wed Jul 27 05:50:32 EDT 2022


What is the best/shortest way to OMIT a range of dates in *every* year?
The remind man page is silent on this issue.

Currently, OMIT using THROUGH requires both dates to have a year
specified.  If I want to leave off the year, I can't use THROUGH and
can only OMIT individual days.

If I want to add a global OMIT that runs, say, June 1 through August 31
every year, it looks either like this with one line per year:

   OMIT Jun 1 2022 THROUGH Aug 31 2022
   OMIT Jun 1 2023 THROUGH Aug 31 2023
   OMIT Jun 1 2024 THROUGH Aug 31 2024
   OMIT Jun 1 2025 THROUGH Aug 31 2025
   ... repeat for as many years as I expect to live, or up to ...
   OMIT Jun 1 2037 THROUGH Aug 31 2037

or it looks like this with one line per day:

   OMIT Jun 1
   OMIT Jun 2
   OMIT Jun 3
   OMIT Jun 4
   ... repeat for every day until ...
   OMIT Aug 30
   OMIT Aug 31

(I note the man page insists that only "OMIT day month" will work,
but remind seems happy with "OMIT month day" as well.)

Maybe this below is a shorter way to do what I want if both dates are
in the same year, but I'm not sure:

   # OMIT Jun 1 <thisyear> THROUGH Aug 31 <thisyear>
   OMIT Jun 1 [$Uy] THROUGH Aug 31 [$Uy]

If I wanted to OMIT, say, Sep 1 this year through May 31 next year,
every year, maybe splitting it in two so that both dates were in the
same year would work, but I'm not sure:

   # OMIT Sep 1 <thisyear> THROUGH May 31 <nextyear>
   #   becomes
   # OMIT Sep 1 <thisyear> THROUGH Dec 31 <thisyear>
   # OMIT Jan 1 <thisyear> THROUGH May 31 <thisyear>
   OMIT Sep 1 [$Uy] THROUGH Dec 31 [$Uy]
   OMIT Jan 1 [$Uy] THROUGH May 31 [$Uy]

All of the above are messy, even if they work.

Enhancement Request: Can these tidy expressions below be made to work?

   OMIT Jun 1 THROUGH Aug 31     # both dates in current year
   OMIT Sep 1 THROUGH May 31     # second date is in year following
   OMIT Jan 31 THROUGH Jan 1     # second date is in year following

If the second month/day precedes the first month/day, then the second
month/day must be in the year following the year of the first month/day,
but since the reminder happens every year, it's the same as having
two separate OMIT statements with the first starting at the first
month/day and running to the end of the year and the second starting
at the beginning of the year and running to the second month/day (as
shown earlier).

Of course, that leads me to ask: Can "OMIT Jan" be syntactic sugar for
"OMIT Jan 1 THROUGH Jan 31" without me having to know the number of days
in the month?  And can "OMIT Jan THROUGH Mar" be sweet syntactic sugar
for "OMIT Jan 1 THROUGH Mar 31", again letting the computer do the work
of knowing how many days are in the month so that I don't get it wrong.

If the above enhancement can't be made to work, could the OMIT section
of the remind man page be updated to show the best/shortest way to OMIT a
range of dates in every year without having to duplicate the OMIT line for
every year up to 2037, or for every day in the date range?  The examples
added should include both the case where the two dates are in the same
year, and the case where the second date is in the following year.

-- 
| Ian! D. Allen, BA-Psych, MMath-CompSci  idallen at idallen.ca Ottawa CANADA
| Home: www.idallen.com  Contact Improvisation Dance: www.contactimprov.ca
| Former college professor of Free/Libre GNU+Linux @ teaching.idallen.com
| Improve democracy www.fairvote.ca and defend digital freedom www.eff.org


More information about the Remind-fans mailing list