This is the mail archive of the mailing list for the glibc 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: [RFC][PATCH] Multiple locales: Use the correct date and time formats (bug 10496, 23724).


I'm sorry for this delayed reply.  Please see my answers inline:

8.11.2018 13:05 TAMUKI Shoichi <> wrote:
> [...]
> For example, user-oriented software implemented to output logs using
> %c, the preferred calendar time representation for the current locale
> for the sake of clarity, will be inconvenient if the date and time
> width varies.

This is a good point and I don't know what to say.  Indeed, for the log
files it is convenient to display constant width dates and times.
On the other hand, most of the time I was thinking about displaying just
one date and/or time, for the purposes of user interface.

Therefore I'm asking community here.  Please provide your feedback:
should the date and time formats provided by glibc locale data keep the
constant width of the output (because it makes easier to display lists of
dates and times in vertical columns, like in log files) or should it be
allowed to provide variable width formats as well (because it follows
the local conventions of displaying single dates, standalone, like in
the user interface)?  Or maybe we should not worry about log files because
they should not be localized and use only the default C locale for date and
time format?  Mike, Carlos, others?

> > > I have roughly checked in the current locale data to see which locale
> > > uses a variable width at d_t_fmt.  The result is:
> > > 
> > > ca_ES:	"%A, %-d %B de %Y, %T %Z"
> > > cs_CZ:	"%a<U00A0>%-d.<U00A0>%B<U00A0>%Y,<U00A0>%H:%M:%S<U00A0>%Z"
> > > hu_HU:	"%Y. %b. %-e., %A, %H:%M:%S %Z"
> > > it_CH:	"%a %-d %b %Y, %T"
> > > it_IT:	"%a %-d %b %Y, %T"
> > > nr_ZA:	"%a %-e %b %Y %T %Z"
> > > pl_PL:	"%a, %-d %b %Y, %T"
> > > ss_ZA:	"%a %-e %b %Y %T %Z"
> > > st_ZA:	"%a %-e %b %Y %T %Z"
> > > szl_PL:	"%a, %-d %b %Y, %T"
> > > tn_ZA:	"%a %-e %b %Y %T %Z"
> > > ts_ZA:	"%a %-e %b %Y %T %Z"
> > > xh_ZA:	"%a %-e %b %Y %T %Z"
> > 
> > Thank you for this survey!  Yes, this is an evidence that variable width
> > date formats may be acceptable.
> These are only 13 locales out of the total 353 locales.  Please note
> that there are fixed-width date and time formats for almost all other
> locales (96.3%) except the above.

I assume that maybe other maintainers and/or translators were not aware
of "-" format modifiers, or maybe they did not care, or maybe there were
no maintainers at all.  Or maybe, simply, these are the correct
requirements of other locales.

Additionally, please note that "%-m" format (month number without any
padding) is used in 36 locales, mostly in d_fmt, many of them added only
recently (in September if I remember correctly).  I'm trying to get
some feedback whether it is problematic or not but still I don't get
any therefore I assume it is correct.

> [...]
> By the way,
> 	"9:00 a.m. - 5:00 p.m."
> in English is translated as
> 	"9:00 e paradites - 5:00 e pasdites"
> in Albanian.
> So, should we include such a representation?

It is not in glibc, is it?  I think that glibc is correct regarding this.

Best regards,


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