See "About This JavaScript Site" in JavaScript Index and Introduction.
See "General Date/Time Introduction" in JavaScript Date and Time Introduction.
See also in JavaScript Date and Time 6 : Date / Time Choosers and VBScript Date and Time 2 ff.
This civil month (to show suffixes), with today's date in red italics :-
The JavaScript behind the following is moderately tested. Input dates are not validated; but all conversions are via Chronological Modified Julian Date, so all results are valid dates. MJD is, of course, GMT-based; CMJD is as MJD but for the local day. For more limited purposes, it would be easy to simplify to use the usual JavaScript base date. Current calendar rules are assumed. All three- and four- digit years should be reliable. Do not insert ridiculous or malformed numbers (there is partial protection).
Range is now A.D. 0001 to 9999 inclusive.
Week Numbers are as ISO 8601.
Determination of the other Moveable Feasts & Fasts of the Church of England is now trivial; they are almost all at constant offsets from Easter Sunday. For secular holidays, also see Annual Holiday Dates. For Jewish days, see in The Hebrew Calendar.
Repeated use of setTimeout(<command>, 1000) may give average intervals of over one second, because of execution time and timer resolution. To reliably lock to the second, calculate the delay needed each time, as here and in JavaScript Date and Time 0 : Date Object Information.
Reference to the JavaScript date functions could be removed entirely (except for determining "Now" and "Today"), by replacing them with more predictable and controllable code derived from my dateprox.pas; however, if used correctly, the JavaScript Date object is powerful. On the other hand, some parts use (for compatibility with previous Pascal work) CMJD for the day count; and, if used in isolation, could be converted to rely more on Date objects. And Wryt has replaced DynWrite.
See in and via Date and Day Count, The Date of Easter Sunday, and JavaScript Include Files.
For JavaScript Date Bugs, now see in JavaScript Date and Time Troubles.