On Tuesday, 23 de August de 2011 14:00:02 [email protected] wrote:
> >I guess we agree on no Mayan; only CLDR calendars.
> 
> Yes, that's the same as not supporting layouting of egyptian hieroglyphs
> ;-)

Uh... not exactly. Egyptian hyeroglyphs are part of Unicode and you might run 
into them on webpages, so they should be properly laid out :-)

Not that most people could tell the difference between properly laid out and 
poorly done...

> >Ok, then let's go for a QCalendar or QCalendarSystem that must be
> >initialised
> >with an enum. The constructor should default to Gregorian and there
> >should be
> >a System or Locale value to match the locale's preferred calendaring
> >system.
> 
> Should the default constructor go to gregorian or should it go to the one
> the user selected as his primary calendaring system?

Trade-off. I think it depends greatly on what Gregorian methods we keep in 
QDate for convenience. If there's enough of them to get by on trivial 
operations, then QCalendar should default to the locale. Otherwise, to 
Gregorian.

I'm thinking that QDate should have the getters and setters for the year, 
month and day, plus the ISO week and other ISO things, properly marked as 
such. Those functions should operate on the proleptic Gregorian calendar even. 
But the manipulation functions like addYear, addMonth, addDay, etc. should not 
be there (QT4_COMPAT only).

I'd like John's opinion here.

> >> Let's please not go into using platform dependent code (or integrating
> >> with it) for the moment. Using CLDR makes all of the code 100% cross
> >> platform and thus a lot easier to test.
> >
> >I agree. I'm just trying to find the implications. John says Windows has
> >hundreds of tiny deviations and corrections -- why are they there and
> >should
> >we have them?
> 
> Yes, sounds weird. One would think that calendars are well defined and
> have a one to one mapping to a day that actually happened (ie. A number in
> julian).

Yeah, that's how they should be, but there are regional variances anyway. Take 
the week number, for example: in the US, week 1 of the year is the week 
containing the first Saturday of the year and Sunday is the first day of the 
week, whereas in Europe, we use the ISO calculation: the first week is the week 
containing the first Thursday and the week starts on Monday. (Those weird rules 
simply mean in the US the first week is the week with the first day of the 
year, 
whereas ISO says it's the week containing more days this year than the 
previous year).

Applying to the calendar, it's possible to account for political variations, 
such as the earliest date of the Gregorian calendar: it was Oct 15, 1582 on 
most catholic countries, but March 1st, 1700 in Denmark, Norway and parts of 
Germany, Sept. 17, 1750 in the US and the UK, and only February 14, 1918 in 
Russia. The last one was Turkey in 1926.

Going to extremes, the date of February 30, 1712 is valid in Sweden and in 
Finland. (see http://en.wikipedia.org/wiki/Swedish_calendar, which starts as 
"The Swedish Calendar was a calendar in use in Sweden and its possessions from 
1 March 1700 until 30 February 1712")

According to the Wikipedia, it's possible to have variances on the first day of 
the year too.

So, without knowing more information, I guess that Windows has those regional 
differences due to political pressure of some regions to have their calendar 
exactly as they want.

        -- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to