This has its own locale data, extracted from CLDR.
[ChangeLog][QtCore][QCalendar] Added support for the Jalali (Persian
or Solar Hijri) calendar, controlled by feature jalalicalendar.
Fixes: QTBUG-58404
Change-Id: Id5c56a10db05a4fd612aafc01615273db81ec743
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Add QCalendarBackend as a base class for calendar implementations and
QCalendar as a facade via which to access it.
QDate's implicit implementation of the Gregorian calendar becomes
QGregorianCalendar and QDate methods now support choice of calendar.
Convert QLocale's CLDR data for month names to a locale-data component
of each supported calendar and relevant QLocale methods now support
choice of calendar. Adapt Python scripts for locale data generation to
extract month name data from CLDR (keeping on version v35.1) into the
new calendar-locale files. The locale data for the Gregorian calendar
is held in a Roman calendar base, for sharing with other calendars.
Add tests for basic uses of the new API.
[ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse
calendars, supported by implementing QCalendarBackend.
[ChangeLog][QtCore][QDate] Allow choice of calendar in various
operations, with Gregorian remaining the default.
Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Fixes: QTBUG-17110
Fixes: QTBUG-950
Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The template for the "This is a generated file" notice made a clumsy
intrusion in the code in which it appeared, so split it out as a
constant of the module and access it by name where it's used.
Change-Id: Ic4dfb8e873078c54410b191654d6c21d082c9016
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We've not run util/locale_database/cldr2qtimezone.py for a while, so
CLDR has had time to add several more zones. Catch up, inserting the
new entries in order.
Change-Id: I8625548b0f7775958230eccbd89b897d7afed9e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It wasn't mentioned in cldr2qlocalexml.py's instructions, so I didn't
know to run it. The data it used in an illustration was out of date.
Two tests could be combined with no loss.
Change-Id: I26e619e6210ea5b1258326fc4bc2b6aee9d6a999
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When scanning the CLDR data, the script raised an exception if it
didn't recognize a zone ID. Instead, collect up such unrecognized IDs
in a list and report them all at the end, so that whoever runs this
can do them all in one go, rather than doing one, running the script,
doing the next, running the script, ad nauseam.
Change-Id: Ia659f1d1c7e1c1b4ccb87cc23828a0588a5bf958
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use tuples for the fixed data. The numbering of rows in the data
tables isn't part of any public API, so we can change it freely; it is
thus unnecessary, as we can just enumerate a tuple of the data values
to generate sequential indices on the fly. (Updates to the data shall
no longer need to renumber in order to insert entries.)
Restore ordering of the data tables, and remove wanton spacing from
inside parens, in the process.
Change-Id: I59956cfb6191fe729300b57070671b7e66bd0379
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We'll be adding calendar code here as well, and tools/ was getting
rather crowded, so it looks like time to move out a reasonably
coherent sub-bundle of it all.
Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When parsing the CLDR data, we only handle language, script and
territory (which we call country) codes if they are known to our
enumdata.py tables. When reporting the rest as unknown, in the
content of an actual locale definition (not the likely subtag data),
check whether en.xml can resolve the code for us; if it can, report
the full name it provides, as a hint to whoever's running the script
that an update to enumdata.py may be in order.
Change-Id: I9ca1d6922a91d45bc436f4b622e5557261897d7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
It was misnamed local_database, quite missing the point of its name.
Change-Id: I73a4fdf24f53daac12304de1f443636d89afacb2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>