This is the mail archive of the
libc-locales@sourceware.org
mailing list for the GNU libc locales project.
Re: Variable length date strings in glibc locales?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: myllynen at redhat dot com, Keld Simonsen <keld at keldix dot com>
- Cc: libc-locales at sourceware dot org, "mtk.manpages" <mtk dot manpages at gmail dot com>
- Date: Tue, 27 May 2014 09:37:07 -0400
- Subject: Re: Variable length date strings in glibc locales?
- Authentication-results: sourceware.org; auth=none
- References: <538437B0 dot 50808 at redhat dot com>
On 05/27/2014 02:58 AM, Marko Myllynen wrote:
> Hi,
>
> in some languages dates are written without leading zeroes so that May 3
> would be "3.5.". The same for time, 08:07:00 would be "8.07.00".
>
> In glibc locales it would be possible to write dates and times in such
> fashion but do we know how that would affect existing applications? Are
> they expecting dates and times to be fixed length and would variable
> length date strings cause formatting or layout issues? Looking at
> existing locales, almost all of them use fixed length strings for
> d_fmt/t_fmt/date_fmt/d_t_fmt.
>
> Ideally of course it would be nice to change certain locales to use date
> and time formats according to their cultural conventions and national
> recommendations but if that would lead to wonky layout in applications
> then it's probably better to be pragmatic and use fixed length dates.
>
> I could add few words about this to our Locales wiki page if someone
> happens to know what's the best approach here.
I know of no guarantees given about constant length date string.
Therefore I believe that applications will have to put up with
variable length dates if that is what the locale specifies.
The guiding principle is that we want to represent dates as
expected by the native speaker. If the application wants a constant
length they will need to arrange that by breaking up the string
and spacing it out themselves?
Cheers,
Carlos.