[Remind-Fans] Determining "the closest Sunday to $DATE"
Tim Chase
remind at tim.thechases.com
Sun May 31 15:47:45 EDT 2020
On 2020-05-31 15:21, Dianne Skoll via Remind-fans wrote:
> On 2020-05-31 14:41, Tim Chase wrote:
> > I have an annual event that falls on "the Sunday closest to Jan
> > 22nd" and wrestled with how to express this.
>
> REM SUN Jan 19 MSG convince yourself that this is correct...
Wonderfully elegant and, yes, I'm convinced. :-)
My usual "convince myself" test is something like
$ for y in {2000..2020} ; do cal 1 $y ; done | less
and then spot-check the results. Looking at it with hind-sight,
it's clear that the "Sun Jan 19" is a much more straight-forward way
of expressing it.
Thanks!
-tim
More information about the Remind-fans
mailing list