RFC: ExtDate in kdelibs?

Jason Harris kstars at 30doradus.org
Mon Sep 20 18:59:49 BST 2004


Hello,

In KStars, we wanted the ability to use dates outside of the normal Qt 
range (years 1752-8000), so we have created replacements for QDate, 
QDateTime, and some of the date-related widgets (e.g., KDatePicker), in 
kdeedu/libkdeedu/extdate.  There are some test suites in that 
directory, so you can verify that it is compatible with QDate.

One thing the ExtDate widgets do not handle is the use of non-Gregorian 
KCalendarSystems, because KGlobal::locale()->calendar() would need to 
return an ExtCalendarSystem object.  I ported ExtCalendarSystem and 
ExtCalendarSystemGregorian, and we currently use only this calendar in 
the widgets.

I'd like to propose adding ExtDateTime to kdelibs (probably renaming 
it to KDateTime) for KDE4, and updating the date-related widgets and 
KCalendarSystems to use this new extended date class.

pros:
- remove arbitrary restriction on QDates
- allow KStars to use localized calendar systems 

cons:
- ExtDate and friends are currently under the GPL, because I didn't 
understand about the KDE exception to the Qt GPL license when I added 
the classes (and possibly still don't fully understand it).  Anyway, 
assuming it really is Ok to move code from Qt into kdelibs under the 
LGPL, it should be trivial to change the license.
- It's possible (maybe even likely) that no app in the KDE universe 
besides KStars is remotely interested in dates outside the range 
1752-8000.
- more work for me, with the added pressure of making extensive commits 
deep inside kdelibs, where heretofore I have barely dared to propose 
the occasional patch!

kind regards,
Jason
-- 
KStars: A KDE Planetarium
http://edu.kde.org/kstars



More information about the kde-core-devel mailing list