mozilla.org Announces Calendar Project
Thursday October 25th, 2001
mozilla.org today announced that OEone, makers of the Penzilla Linux device that uses Mozilla as its shell, will be offering a significant portion of their calendar code to Mozilla. For more info on this, check out Gerv Markham's post by clicking the Full Article link.
#23 More complex than that
Friday October 26th, 2001 7:15 AM
You are replying to this message
For some holidays (for instance, non-US national holidays like the Queen's Birthday or Indian Independence Day), this is something that's probably quite easy to do: that is, for holidays that occur regularly (i.e., don't require an ephemeris to date, but can simply follow calendar rules).
For non-civil calendars, on the other hand, it might be more difficult: since the Muslim calendar at least is lunar, and I believe the Jewish calendar, the math is completely different from the solar Gregorian civil calendar. A calendar that doesn't follow the math of the Gregorian calendar (days=365, unless ((y/4=integer) & ((y/100 != integer)|(y/400 = integer))), in which case days=366), especially one where the year starts on the first new moon after a solstice or equinox, would require another, more complex math engine. The math's already been done, of course, so maybe you could add functions for each holiday (Easter, Yom Kippur, etc.), but this is just to point out that adding lunar calendars and lunar holidays is a non-trivial task. You could just calculate them all yourself and add them one day at a time for the next 100 or so years, but that, too, is non-trivial.