[Top][All Lists]

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

Re: Time string format

From: Eli Zaretskii
Subject: Re: Time string format
Date: Sat, 20 Nov 2010 12:09:26 +0200

> From: Deniz Dogan <address@hidden>
> Date: Sat, 20 Nov 2010 03:49:24 +0100
> Cc: address@hidden
> 2010/11/19 Eli Zaretskii <address@hidden>:
> > time.el:display-time-string-forms believes that the right format for
> > displaying the date in the mode-line tooltip is "%a %b %e, %Y".  This
> > is not necessarily TRT in languages other than English, because
> > putting the month name before the day of the month does not
> > necessarily read well in other languages.
> >
> > Would it be a good idea to have an element of language-info-alist that
> > provides a proper format for this?
> >
> >
> In the docstring for `format-time-string':

Granted, I've read that ;-)

> %c is the locale's date and time format.
> %x is the locale's "preferred" date format.
> %X is the locale's "preferred" time format.
> %EX is a locale's alternative version of %X;
> %OX is like %X, but uses the locale's number symbols.
> One of these or a combination of multiple formats seems ideal to me.

I think you are missing the point.  The issue is not what each of the
format specifiers produce, the issue is their order in a
_well-formatted_and_short_date_ string.  When viewed from this POV, I
think you will agree with me that

  . %x is inappropriate, because in most (if not all) locales it
    returns a numerical date, like 11/22/33, while time.el wants to
    produce human-readable names of the month and the week-day

  . %X, %EX, and %OX are irrelevant, because I was talking about
    the date, not the time

  . %c is inappropriate, because it shows the time together with the

  . any combination of the above will be inappropriate for the same
    reasons the individual specifiers are

It is therefore a small wonder that time.el does not use any of these,
but instead attempts to define its own format.  The problem is that
the result is not correct for some locales/languages.  I was asking
about a good way of having that fixed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]