public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/4628] Provide rump locales with ISO 8601 variants for use with LC_TIME
Date: Thu, 06 Jan 2022 22:03:50 +0000	[thread overview]
Message-ID: <bug-4628-716-3lUEJDc2HS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-4628-716@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=4628

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.mozilla.or
                   |                            |g/show_bug.cgi?id=1509096

--- Comment #22 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to David Woodhouse from comment #21)
> Any progress on this?

I am not aware of any progress on this issue.

Let me summarize the current state over the 14+ years this bug has been open.

I feel that ISO 8601 is a red-herring here, and the vast majority of users are
simply talking about d_fmt and the default becoming YYYY-MM-DD for their
particular use case.

There are three positions that can be taken on default value of d_fmt:

(a) A locale represents the information for an application to use to present
such information to someone local in that locale. Thus d_fmt should be used
when exchanging information locally (whatever that means). An application may
make a choice that in the context of the application's use of the data choose
to present the data in a more interoperable unambiguous format, a 21st century
way, e.g. YYYY-MM-DD for d_fmt.

(b) A locale represents the default way information should be presented, and in
the 21st century, this means d_fmt should be YYYY-MM-DD.

(c) The framework should allow for easy customization of the pattern used for
d_fmt, without loosing the language-specific localization in the rest of
LC_TIME.

Several early responders to this issue in 2007 took the position of (a), and
that no further work was required in glibc. Users were rightly upset because
the solution of making your own locale is not well supported by glibc as a
process in general. Also users only really wanted d_fmt to be YYYY-MM-DD, and
everything else the same.

Some users over time have taken the position (b).

Recent glibc developers have started to come around to (c), and it follows on
from the fact that ICU and other libraries do allow a certain amount of dynamic
customization of date format patterns, as seen in the solution for Thunderbird
here: 
"Implement pref overrides for date and time formats:
intl.date_time.pattern_override.date_* and
intl.date_time.pattern_override.time_* (was: TB 60 on Linux: Setting date
locale to LC_TIME=en_DK.utf8 no longer outputs yyyy-MM-dd format)"
https://bugzilla.mozilla.org/show_bug.cgi?id=1426907

To date we have several suggestions for a way forward:

(1) Add @ variants to all locales.
- Duplicate all locales, rename, and change d_fmt to %Y-%m-%d (with clever
include usage to reduce duplication).

(2) Add @ variants to a few key locales.
- Solution (1) but reduce the overall work and gives some users a solutions.

(3) Implement a language:territory layering.
- Provide a new format for specifying LC_TIME that allows a user to layer
language and territory information. LC_TIME would need to be split into
language-specific entries, and territory-specific entries (language neutral),
and allow layering.

None of (1), (2) or (3) have been implemented to date.

I see maybe another way forward:

(4) New pattern with override selection.

Following the Mozilla and ECMA Script recommendations it might be more possible
to define variants of d_fmt, and allow users to pick a variant e.g.

In environment:
LC_TIME=en_US,d_fmt={iso8601}

In locale sources:
d_fmt            "%m//%d//%Y"
% Variant {iso8601} pattern for d_fmt.
d_fmt_iso8601    "%Y-%M-%d"

Where the locale sources provide tested canonical patterns for the variants.
Then users can pick the variants and we can easily add variants. At the
implementation level we would need to change a pointer after parsing the env
var and we would also break the sharing of some of the pages of the mmap'd
binary locale.

Notes:
https://bugzilla.mozilla.org/show_bug.cgi?id=1426907
https://bugzilla.mozilla.org/show_bug.cgi?id=1509096
https://unicode-org.atlassian.net/browse/CLDR-5769
https://unicode-org.atlassian.net/browse/CLDR-12027
https://github.com/tc39/proposal-intl-datetime-style

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2022-01-06 22:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-4628-716@http.sourceware.org/bugzilla/>
2016-02-04 13:57 ` fweimer at redhat dot com
2016-05-20 12:44 ` dwmw2 at infradead dot org
2016-05-20 12:44 ` fweimer at redhat dot com
2016-05-20 13:20 ` nicolas.mailhot at laposte dot net
2016-05-20 13:55 ` carlos at redhat dot com
2016-05-20 13:59 ` fweimer at redhat dot com
2016-05-20 14:04 ` carlos at redhat dot com
2016-05-20 19:13 ` carlos at redhat dot com
2016-05-20 19:13 ` vapier at sourceware dot org
2016-05-20 22:36 ` gunnarhj at ubuntu dot com
2016-05-20 22:37 ` carlos at redhat dot com
2016-05-20 23:28 ` gunnarhj at ubuntu dot com
2017-08-02 13:57 ` yjf.victor at foxmail dot com
2018-06-24  0:50 ` joerg_bugzilla_sourceware at reisenweber dot net
2018-06-24  0:55 ` joerg_bugzilla_sourceware at reisenweber dot net
2021-12-21 14:18 ` dwmw2 at infradead dot org
2022-01-06 22:03 ` carlos at redhat dot com [this message]
2022-01-06 22:04 ` carlos at redhat dot com
2022-01-06 22:04 ` carlos at redhat dot com
2022-01-06 22:04 ` carlos at redhat dot com
2022-01-07  9:48 ` nicolas.mailhot at laposte dot net
2022-01-07 10:58 ` dwmw2 at infradead dot org
2022-01-07 11:29 ` nicolas.mailhot at laposte dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-4628-716-3lUEJDc2HS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libc-locales@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).