JRS: In article <200420041508342953%denmarks (AT) domain (DOT) invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <denmarks (AT) domain (DOT) invalid>
posted at Tue, 20 Apr 2004 15:08:34 :
Quote:
I've been updating by date stuff at my web site using much of the
information obtained here. Would you please check it for any errors.
The two pages are "Yearly Calendar" and "Date Calculator".
There is no year validation on the "Yearly Calendar" but it is only
correct for years 1 and up. There is full validation in the "Date
Calculator" but I limited the dates to years 1-9999.
I did not allow years before the year 1 since I am still confused about
leap year calculation for B.C. dates. |
Read "The Calendar FAQ", linked from my site.
In the proleptic Gregorian astronomical calendar, the same rules apply
throughout. But one must allow for, or prevent, the different behaviour
of the % operator with a negative argument. Similarly for the quasi-
proleptic Julian.
Convert between astronomical and Christian by adding/subtracting 1 for
year numbers before Year 1.
For the civil calendar, you can allow for the Julian-Gregorian change,
varying with locality; the change from Roman to Arabic numerals; the
change from AUC to AD dates; the miscalculations affecting 45BC..4AD;
the Year of Confusion, etc.
Then there is the matter of Sweden 1700-1712, Alaska 1867, and other
more recent funny goings-on in the Pacific.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.