Calendar System changes in SC 4.5

Yes, my favourite topic :-)

In SC 4.5 I've only added 3 new calendar systems, all based on the Gregorian calendar but using different epochs or year counting methods. 

The Thai calendar uses the Buddist Era as its epoch, which starts counting years from March 545 BC, making 2010 AD = 2553 BE.  Thanks go to Thai user Thanomsub Noppaburana for helping me to implement this. This is sometimes mistakenly called the Buddhist Calendar due to using the Buddhist Era, but the real Buddhist Calender uses a lunar calculation.

The Taiwanese calendar (also called the Minguo or Republic of China calendar) uses the ROC Era which starts counting years since 1912 AD, making 2010 AD = 99 ROC (yes, they have a Year 100 problem coming up :-). By coincidence this is the same as the North Korean Juche calendar, which uses the birth of Kim Il-sung as its epoch.  If there's any North Korean users out there, I can add the calendar if you need it.

I did think about implementing the Korean Dangi Era calendar which used 2333 BC as its epoch, but as far as I can tell this was only used between 1952 and 1961 so would have no current usage.  Strangely Microsoft does implement it, so if you know a reason why we should support it drop me a line.

The Japanese calendar can use the usual AD/CE year 1 as it's epoch, but also has an alternative year counting system based on the Nengo or Japanese Era system.  Basically, this system counts the year number from the start of the Emporers reign, so 2010 AD = Heisei 22, but 1988 AD was Shōwa 63.  Implementing this required implementing the POSIX standard for era date formats, so you can also now configure your date formats in any calendar system to include the Era.  For Gregorian, this also includes the ability to choose between AD/BC and CE/BCE.  As a bonus, you can also now configure your date formats to include ISO Day of Year, ISO Week, and ISO Day of Week. (Note there's a bug in System Settings when choosing Use Common Era, but the setting does get saved and used.  It will be fixed soon.)

Date & Time settings in KDE SC 4.5

Available date formats in KDE SC 4.5

If you want different formats for the Era names, such as A.D. instead of AD, or even to create your own set of eras, then this can be done in the global config file.  I haven't implemented a gui for this in Sytem Settings as I doubt it would be much used, but it is an option for the future.

One note on the Taiwanese calendar, distro's that maintain a patchset removing other Taiwanese features from KDE such as locale, flags, and translations for distribution in mainland China will probably need to remove this as well.  KDE is apolitical and the presence or absence of such features should not be read as any kind of political statement, we merely seek to meet the needs of as many users as possible.  (For the record, both Windows and OSX also ship outside mainland China with these features enabled).

Speaking of the competition, this means we now have 11 calender systems implemented, which are 8 of the 15 available in Windows and 4 they don't support, and 10 of the 12 available in OSX and 1 they don't support.  We really only need the lunar based calendars now, mainly the Islamic Lunar and the Chinese Lunar which are the basis of many local variants.

Available calendar systems in KDE SC 4.5

For the coders out there, I've also added some more utilities to the API.  The most interesting are getDate() (copied from the new QDate method in Qt4.6) that returns all the YMD componants in a single call, various routines to calculate the years, months and/or days difference between two dates in a consistent manner with the add YMD methods.  I've also added the ability to format dates using a subset of the Unicode standard as used by Qt in the QDate::toString() method.

I'll also mention here that I've added support for 10 more local digit sets as shown below (the values from Bengali onwards are new):

Digit Sets available in KDE SC 4.5

There's another 20 digit sets supported by the Unicode standard that we could implement, but their languages are as yet un-translated in KDE so I've only documented them for now.  If any of the languages are ever translated, we only need to un-comment one line to enable their digit set.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks and a typo hint

John, thank you for your work on internationalization. It is highly appreciated. :)

 

I found a small typo: In the screenshot for the digit sets, it reads "Devenagari", while it should be "Devanagari".

 

Cheers,

 

mutlu

Whoops!  You're right, and

Whoops!  You're right, and that's been there since SC 4.3, and there's even an enum for it that's spelt wrong too.  We won't be able to fix the enum, but I'll fix the gui string.

 

Thanks!

About Dangi calendar

Dangi's implementation goes back to historic era, official usage in government started in 1948. Although Korean government ceased usage of Dangi for official purpose in 1961, it is *still used* in printed calendar in South Korea. That doesn't mean *no* usage in Korea, but *informal usage* throughout Korea. Also that's why Microsoft didn't dropped Dangi support in Windows.

Thanks, if it still has

Thanks, if it still has common usage then that's enough for inclusion.  I'll add it in SC 4.6.

Digit sets

I think we should enable support for all the digit sets we can support. One reason is that translations can get added even with point releases, and you don't want to have to enable digit sets in point releases since that means at least one additional translatable string.

Hmmm.  I'll ask on the i18n

Hmmm.  I'll ask on the i18n list if they think it's a good idea.  As it is we're in string freeze now so it would be something for SC 4.6.

Thank you!

Thank you John! KDE-PIM is the only FOSS PIM that takes the Hebrew locale seriously, in fact KDE-PIM is what is enabling us to move to free software. Thank you thank you thank you!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.