Re: [Evolution] Locale-dependent features

Ilya Konstantinov wrote:

I was wondering - could it be possible to retrieve whether
the calendar should use a 24 hours or an AM/PM representation
in the 'Day view' from the current locale?

As I understand, the glibc locale information stores the strftime
formats which it uses to format the date.
We could figure out whether it uses %I (12 hours) or %H (24 hours)
to represent the hours part.

I can't see a way of determining which format is preferred in the
current locale. In strftime() I think you have to choose explicitly
 - even with a LANG of en_US it uses 24-hour format for the preferred
time format "%X", when the preferred format is really 12-hour.
If we could figure this out then we could use it as the default setting.

But we'd still need a preference setting as in some places it is more
of a personal choice.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]