[Remind-Fans] Determining "the closest Sunday to $DATE"

Dianne Skoll dianne at skoll.ca
Sun May 31 18:20:45 EDT 2020


On 2020-05-31 15:47, Tim Chase wrote:

> On 2020-05-31 15:21, Dianne Skoll 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 approach to these (seemingly) complicated scenarios is this: Ask
yourself when's the *earliest* it could happen, and when's the
*latest*.  And then the answer usually pops right out.

Same principle for the US election day, which is set as
the Tuesday after the first Monday in November, which
is really just:

	REM Tue 2 Nov MSG Election Day.

Regards,

Dianne.


More information about the Remind-fans mailing list