bug-sh-utils
[Top][All Lists]
Advanced

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

Re: date default output format : locale-dependency


From: Jim Meyering
Subject: Re: date default output format : locale-dependency
Date: 11 Nov 2000 09:00:55 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Jungshik Shin <address@hidden> wrote:

| To whom it may concern:
|
| I'm writing to suggest that the default output format of 'date' (when
| neither '-R' nor '-I' option is given) has to be made locale-dependent
| using gettext().
|
| date.c (in sh-utils-2.0) has the following:
|
|       format = (rfc_format
|                 ? (universal_time
|                    ? "%a, %_d %b %Y %H:%M:%S GMT"
|                    : "%a, %_d %b %Y %H:%M:%S %z")
|                 : (iso_8601_format
|                    ? iso_format_string[iso_8601_format][universal_time]
|                    : "%a %b %e %H:%M:%S %Z %Y"));
|
| All but the last one is locale-independent. However, the last one "%a %b
| %e %H:%M:%S %Z %Y" is locale-dependent. For instance, in ko_KR locale,
| "%x %r" is more appropriate.  Therefore, I think it has to be enclosed
| with 'gettext()' (or _() macro)

Thanks for the suggestion.
That problem was addressed by this change:

2000-03-29  Paul Eggert  <address@hidden>

        * src/date.c: Include <langinfo.h> if it exists.
        (DATE_FMT_LANGINFO): New macro.
        (show_date): Use it to get the locale-specific default format for
        "date" if it exists.

I'll probably go ahead and add _() regardless,
for those systems that lack _DATE_FMT.

The latest release is here:
  ftp://alpha.gnu.org/gnu/fetish/sh-utils-2.0.11.tar.gz



reply via email to

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