Soroush Rabiei wrote: > Nowadays, almost all major programming frameworks support calendar > globalization. We are a small group of developers working with > non-Gregorian calendars and we believe Qt must support this too. This > proposal discusses details of our plan (and early implementation) to > add support for multiple calendar systems in Qt library.
Excellent initiative. I've only had time for a cursory review (I'm running away for mid-winter after today, not back until January, and have a few other irons in the fire to get into a sensible state before I go) so shall have to read in greater depth next year. However, one thing did cross my mind in reading: How about having the QCalendarSystem object be an optional parameter to various methods of QDate, that configures how it behaves, with the default behaviour being that of the Gregorian system ? This has the advantage that client code might be able to supply a custom QCalendarSystem object, where an enum-based solution can only know about the ones that the Qt project has chosen to support. Presumably every calendar system can be referred back to the Julian date [0], so most of the QCalendarSystem API would just implement methods mapping Julian date to the chosen calendar's year, month, day &c. [0] which, lest anyone be confused, has nothing to do with the Julian calendar - which *is* still in use ... For the sake of anyone who hasn't understood why calendar system isn't related to locale (or time-zone, or anything else particularly), note that members of a culture that traditionally uses another calendar may want to deal with a government-imposed (probably Gregorian) calendar for all their work planning while using their culture's traditional calendar when organising family and community events. A conference centre organiser, furthermore, may want to be able to switch freely between calendars to get a view of their diverse guests' perspectives in order to avoid cultural gaffes and be ready to accommodate complications. Even if there's nothing religious about the conference, knowing that it happens to fall in Ramadan will prime the conference centre staff to be ready to accommodate any attendees who won't be eating during the hours of daylight, Eddy. _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development