FW: Time zone: the next generation
Kevin Kenny is on the time zone mailing list, but at a different address than that shown below. --ado -----Original Message----- From: kennykb@crd.ge.com [mailto:kennykb@crd.ge.com] Sent: Thursday, March 03, 2005 3:22 PM To: Tz (tz@elsie.nci.nih.gov) Subject: Re: Time zone: the next generation I've done a good bit of similar code for the Tcl programming language (see http://www.tcl.tk/cgi-bin/tct/tip/173 for details). The implementation there can handle the proleptic Julian calendar, with a defined change date. There are a number of caveats worth mentioning: - Prior to the Julian conversion, different locales had different rules for when the number of the year changed. In and before 1752 in Great Britain, for instance, the number of the year changed on 25 March; 1-24 March belonged to the previous year! With the adoption of the Gregorian calendar, the change was universally 1 January. (For this reason, you'll sometimes see eighteenth-century dates as O.S. ("Old Style") or N.S. ("New Style") when the year would otherwise be ambiguous. I decided for Tcl not to bother with any kind of localized rule for year numbering in those circumstances; it was too much of a mess. - As you correctly observe, leap years were observed irregularly in Rome in Republican and early Imperial times. In fact, they were so irregularly observed that it was occasionally necessary to intercalate entire months. Again, I decided with Tcl not to bother. - It appears unnecessary to control skipping the year zero. I have not encountered any locale where there is such a beast; in all cases, it appears that the year 1 B.C.E. is followed by the year 1 C.E. - I use a message catalog (the same catalog in which I hold localised month names) to hold a locale's Julian conversion date, and then select the catalog according to LC_TIME. Tcl's ordinary message catalog functionality can be used to change the date. - I have not yet troubled to implement anything but Gregorian (or hybrid Julian-Gregorian) calendars. I did a limited amount of localization to handle the Japanese civil calendar, but only for dates after the Meiji restoration (when it's Gregorian, except that years number from the start of an emperor's reign). Incidentally, Tcl's counterpart to zic (which uses the same input format as zic) simply uses 64-bit counts of seconds for its transition times. Also, it doesn't track leap seconds, since Tcl's model of time is Markus Kuhn's "smoothed universal time" (http://www.cl.cam.ac.uk/~mgk25/uts.txt) in which leap seconds are handled by changing the length of a second by 1 part in 1000 until Tcl's clock is back in sync with UTC. -- 73 de ke9tv/2, Kevin KENNY GE Corporate Research & Development kennykb@crd.ge.com P. O. Box 8, Bldg. K-1, Rm. 5B36A Schenectady, New York 12301-0008 USA
On Thu, Mar 03, 2005 at 03:24:40PM -0500, Olson, Arthur David (NIH/NCI) wrote:
From: kennykb@crd.ge.com [mailto:kennykb@crd.ge.com] Sent: Thursday, March 03, 2005 3:22 PM
- It appears unnecessary to control skipping the year zero. I have not encountered any locale where there is such a beast; in all cases, it appears that the year 1 B.C.E. is followed by the year 1 C.E.
Astronomers, IIRC, use a calendar with a year zero -- it removes a gratuitous anomaly from calculations. Regardless, for calendars where there is a BCE-CE type distinction, there is no year zero; in calendars where there is a year zero (e.g., "proleptic Gregorian"), the years preceeding year zero continue algebraically, starting with year -1. (modern) (classic) Gregorian Gregorian Astro. 2005 CE AD 2005 2005 2 CE AD 2 2 1 CE AD 1 1 1 BCE 1 BC 0 2 BCE 2 BC -1 4004 BCE 4004 BC -4003 --Ken Pizzini
Ken Pizzini <tz.@explicate.org> wrote on 2005-03-04 00:13 UTC:
- It appears unnecessary to control skipping the year zero. I have not encountered any locale where there is such a beast; in all cases, it appears that the year 1 B.C.E. is followed by the year 1 C.E.
Astronomers, IIRC, use a calendar with a year zero -- it removes a gratuitous anomaly from calculations. Regardless, for calendars where there is a BCE-CE type distinction, there is no year zero; in calendars where there is a year zero (e.g., "proleptic Gregorian"), the years preceeding year zero continue algebraically, starting with year -1.
(modern) (classic) Gregorian Gregorian Astro. 2005 CE AD 2005 2005 2 CE AD 2 2 1 CE AD 1 1 1 BCE 1 BC 0 2 BCE 2 BC -1 4004 BCE 4004 BC -4003
The missing-year-0 BC(E) convention, as well as the 1-to-12-am-pm notation, are wonderful examples for obsolete, inelegant and dangerously fault-prone conventions. Responsible computer folks should stand up against these and tell the world clearly and with force that in no way can these ever be the recommended, proper, responsible ways of doing things. Do not fear the zero! There is a year 0 CE and a year -1 CE, just like there is a time 00:00. Any older notational work-around should have been abandoned after the zero became popular in Europe sometimes in the 1600s. Markus -- Markus Kuhn, Computer Lab, Univ of Cambridge, GB http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__
Olson, Arthur David (NIH/NCI) said:
- Prior to the Julian conversion, different locales had different rules for when the number of the year changed. In and before 1752 in Great Britain, for instance, the number of the year changed on 25 March; 1-24 March belonged to the previous year! With the adoption of the Gregorian calendar, the change was universally 1 January.
It's not even that simple: - England and Wales used the March 25th rule, but Scotland used January 1st. - Some uses even in E&W followed the January 1st rule anyway (e.g. leap year determination). - The change wasn't synchronised with the Gregorian change, but happened a little earlier: 1751 began on Mar 24th but 1752 began on 1st January (thus, while 1752 lost 11 days, 1751 lost 83).
(For this reason, you'll sometimes see eighteenth-century dates as O.S. ("Old Style") or N.S. ("New Style") when the year would otherwise be ambiguous.
And the day, actually.
- As you correctly observe, leap years were observed irregularly in Rome in Republican and early Imperial times. In fact, they were so irregularly observed that it was occasionally necessary to intercalate entire months.
You're confusing the pre-Julian calendar (which used intercalary months) with the Julian one (which used leap days). It wasn't so much "irregular" as "erroneous" - leap days were inserted every *three* years in the period starting 46 BCE; when the mistake was spotted, several leaps had to be omitted. I *believe* that 45, 45, ... 9 BCE were all leap years, then there were 15 common years in a row, with 8 CE being the next leap year.
- I use a message catalog (the same catalog in which I hold localised month names) to hold a locale's Julian conversion date, and then select the catalog according to LC_TIME. Tcl's ordinary message catalog functionality can be used to change the date.
There may be more than one conversion date: Sweden converted twice (including a year which had a February 30th in it). -- Clive D.W. Feather | Work: <clive@demon.net> | Tel: +44 20 8495 6138 Internet Expert | Home: <clive@davros.org> | Fax: +44 870 051 9937 Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646 Thus plc | |
participants (4)
-
Clive D.W. Feather -
Ken Pizzini -
Markus Kuhn -
Olson, Arthur David (NIH/NCI)