help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: even elder races get tired of waiting


From: Jude DaShiell
Subject: Re: even elder races get tired of waiting
Date: Sun, 21 Mar 2021 15:24:39 -0400

Use of cal with a month number and a year number to get a weekday of a particular date can make work a little easier. This is for really long time periods and only inside the gregorian calendar constraints since outside of those constraints things get really wild as a result of compound errors. With that weekday in mind subtracting a year when you won't land in a leap year or adding a year when you won't land in a leap year, subtract or add one weekday to get the correct weekday for that date in those years. If you will land in a leap year, subtract or add two weekdays to get the correct weekday. Modulus the weekday by 7 to keep it in whichever range you prefer to use.. That can get you to the correct forest, then it's a matter of smaller subtraction or addition within a year to get you your exact length.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]