On quarta-feira, 10 de julho de 2013 18.29.41, Leonardo Giordani wrote: > Working on a time applet I found KLocale::formatLocaleTime() which can > return the time as the user specified in the locale configuration. > > I cannot realize, however, how I can get only one part of the locale > formatted time. Say for example that I want to show only the hour, which > can either be 1-12 or 01-12 or 0-23 o 00-24, according to the user > specification.
The locale database doesn't carry this information, unfortunately. That's why there is no way to get it. What you can do is get the time format (not the formatted time, the template string) and extract what it uses for the hour. -- 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
signature.asc
Description: This is a digitally signed message part.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<