Extended ranges required for dates and date-times
kstars at 30doradus.org
Thu Feb 9 18:40:23 GMT 2006
As the maintainer of the ExtDate* classes, I'm glad to see that we are
considering adopting them in kdelibs. I had proposed this back when
KDateTime was first proposed, but the consensus at that time was that
not enough apps would need extended dates to make it worthwhile.
There is a test program in libkdeedu/extdate/tests that demonstrates
that ExtDate and QDate behave identically for the range of dates over
which QDate is valid, so I think there's little reason to use QDate
internally for non-extended dates.
Another issue brought up is the "slightly bizarre" date range of -50000
to +50000. This was an essentially arbitrary choice; there's no reason
why the date range could not be made wider (or narrower).
One issue that has not been mentioned: what is to be done for calendar
dates prior to 1752, for which identifying a particular calendar date
becomes ambiguous (due to different calendar systems in use prior to
1752)? We handle this very simply in ExtDate: we totally ignore it, and
simply extrapolate the modern Gregorian calendar backward. Thus ancient
dates in ExtDate are not *historically* accurate, but they are more
*seasonally* accurate (which was more important for us in KStars).
More information about the kde-core-devel