[Chugalug] Calculating the next Thanksgivukkah
Robert A. Kelly III
bluethegrappler at gmail.com
Tue Oct 8 22:39:19 UTC 2013
On 10/08/2013 03:34 PM, Robert A. Kelly III wrote:
> I've been toying with calculating the next Thanksgivukkah (the date when
> the first day of Hanukkah coincides with Thanksgiving) using remind.
> I've got how to find Thanksgiving:
> REM Dec Thurs 1 -7 MSG Thanksgiving
> And I've got how to find Hanukkah:
> REM [trigger(hebdate(25, "Kislev"))] MSG Hanukkah
> But I'm thinking that in order to find when they coincide you will need
> to write a user-defined function using FSET, to check whether a given
> date is Hanukkah and then use a SATISFY clause to get a date of
> Thanksgiving that is also Hanukkah, or something like that. Does anyone
> know enough of remind to show how to do this?
> Alternatively, would anyone care to try to do this with Emacs calendar?
I found the solution with remind. The reminder file should contain:
FSET isHanukkah(date) \
trigger(date) == trigger(hebdate(25, "Kislev", trigdate()))
REM Dec Thurs 1 -7 SATISFY isHanukkah(trigdate())
REM [trigdate()] MSG Thanksgivukkah
Then you can list all occurrences of Thanksgivukkah for the next century
$ remind -s1200 -x1200 /path/to/Thanksgivukkah-reminder-file
2013/11/28 * * * * Thanksgivukkah
2108/11/29 * * * * Thanksgivukkah
So the next Thanksgivukkah occurs in only 95 years, rather than 79,043.
So, anyone up for doing it in Emacs, just for the nerd cred? I would be
curious to see it.
More information about the Chugalug