This is the mail archive of the libc-locales@sourceware.org mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variable length date strings in glibc locales?


On Tue, May 27, 2014 at 09:58:56AM +0300, 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 think there are two consideraation schools.

1. What is expected by users using POSIX like systems.

2. What is expected by the linguistic oriented users.

This varies from program to program.

For examle "ls" would expect constant width sizzes.
Also logging would expect constant width. 
"date" could be used for either POSIX-like or linguistic like purposes..
We have data for both constant width and variable with.
applications can then use the variant that is wanted.
For the figures, I am not fully sure how to do it in the way
the user would expect it. Maybe we need more formats here.

Also what is expected in specific applications may vary.
Eg. in accounting programs like spreadsheetd you would
normally want a thousands separator different from SPACE,
while in letters and documents you would want the SPACE as the thousands delimiter.

Best regards
keld


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]