Change from Gregorian to Julian calendar in Qt 4.2
nicolasg at snafu.de
Mon Sep 4 20:45:08 BST 2006
On Monday 04 September 2006 21:14, Nicolas Goutte wrote:
> On Monday 04 September 2006 12:43, Thiago Macieira wrote:
> > David Jarvie wrote:
> > >In the latest Qt 4.2 changes, QDate now uses the Julian calendar instead
> > > of the Gregorian for dates before 1582. In some ways, this makes even
> > > more of a mess of date handling than before due to the two calendar
> > > systems. Now, QDate uses Julian dates pre-1582 - which don't
> > > necessarily coincide with historical records since usage of the
> > > calendar wasn't properly standardised. It uses Gregorian dates
> > > post-1582 - but because most countries didn't adopt the Gregorian
> > > calendar until long after 1582, this often doesn't coincide with
> > > historical records either until the 20th century. For scientific
> > > purposes, the Gregorian calendar is universally used both pre- and
> > > post-1582.
> > >
> > >The question for KDE is, should the KDateTime class follow QDate in the
> > > switch to the Julian calendar (which will happen automatically as
> > > things stand since it uses QDateTime internally), or should it be
> > > changed to use a different internal representation for date/time values
> > > so as to continue to use the Gregorian calendar throughout?
> > KDE understands the concept of calendar, so it should use what the
> > calendar specifies. If we're looking at the non-Gregorian, non-Julian
> > calendars, there should be rules for converting the date into Julian
> > Days.
> > For those that are using the Julian calendar (say, the Russian Orthodox
> > Church -- are they using KDE?), it's also straightforward: conversion
> > from Julian Day to Julian Date is required.
> > As for the countries that use the Gregorian calendar, the calendar varies
> > from country to country. There are *very* locale-specific for that and I
> > doubt we have them implemented anywhere. Some countries converted from
> > Julian to Gregorian before others; some went back from Gregorian to
> > Julian (Scotland), some went halfways, then decided to go back and
> > introduced a February 30th (Sweden). This kind of complexity lies surely
> > out of Q/KDateTime. There's only one universally accepted date for the
> > beginning of the Gregorian calendar and it's the one QDate now uses.
> > What may be argued is if QDate shouldn't use the proleptic Gregorian
> > calendar into the past, like I had originally made it do. I tried to
> > argue this point with the Trolltech developer who made the change, but we
> > ended up concluding that conversion rules are necessary for any date
> > after the first introduction of the Gregorian calendar, but not before.
> > That way, at least before 1582, QDate cannot be wrong WRT historical
> > records.
> > Also note that QDate no longer accepts year 0: it counts now -3, -2, -1,
> > 1, 2, 3, 4, ...
> Sorry, but I would really like to ask why an incompatible way was chosen
> compared to ISO dates.
> So now you have two meaning for -1: 2 B.C. in ISO dates, 1 B.C. in Qt. :-(
> (0 is 1 B.C. in ISO).
> Personally I would consider supporting the ISO date much more important
> than trying to play with Julian dates.
Another Wikipedia article seems to be a better reference:
So somehow we have a conflict between historical interests and ISO 8601. :-(
> Have a nice day!
Have a nice day!
More information about the kde-core-devel