On 3/21/19 6:33 AM, Matthias Teege wrote: > On a give occasion I've tried to calculate the beginning of spring > (day and night same lenght) in remind. I've played with > [sunrise(trigdate()) - sunset(trigdate())] but is not exact enough. Is > it possible at all, to calculate the beginn of spring in remind? Any > hints?
In general, it's not possible. The equinox is NOT defined as the date when day and night are as close in length as possible. Here in Ottawa, that would have been March 17th this year: https://www.timeanddate.com/sun/canada/ottawa?month=3&year=2019 There's an explanation here: https://www.timeanddate.com/astronomy/equinox-not-equal.html Here's a Remind script that prints "Equinox" on the day in March whose day length is as close as possible to 12 hours. It is *NOT* the same as the first day of spring and is *NOT* the official Equinox. Regards, Dianne. #================================================================== # Length of the day FSET daylen(x) sunset(x)-sunrise(x) # Get the crossover date - only works in northern hemisphere!!! # For southern hemisphere, change the >= and <= around. REM March SATISFY [(daylen($t) >= 12*60 && daylen($t-1) <= 12*60)] # Get the two day lengths set d1 daylen($t) set d2 daylen($t-1) set d $t # Pick the one closest to 12 hours (=720 minutes) IF abs(d1-720) < abs(d2-720) REM [d] SCANFROM [today()-7] MSG Equinox ELSE REM [d-1] SCANFROM [today()-7] MSG Equinox ENDIF _______________________________________________ Remind-fans mailing list [email protected] https://dianne.skoll.ca/mailman/listinfo/remind-fans Remind is at https://dianne.skoll.ca/projects/remind/
