This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Japanese Era name change and named vs. numbered era date.
- From: TAMUKI Shoichi <tamuki at linet dot gr dot jp>
- To: Carlos O'Donell <carlos at redhat dot com>, Rafal Luzynski <digitalfreak at lingonborough dot com>, libc-alpha at sourceware dot org
- Date: Thu, 31 Jan 2019 09:38:36 +0900
- Subject: Re: Japanese Era name change and named vs. numbered era date.
- References: <968ad54b-08b2-3f62-3829-d86a4c094b30@redhat.com>
Hello Carlos-san,
From: Carlos O'Donell <carlos@redhat.com>
Subject: Re: Japanese Era name change and named vs. numbered era date.
Date: Wed, 30 Jan 2019 00:03:55 -0500
> > In ja_JP localedata in Glibc, as in the Heisei example below, the
> > first year of the era is defined separately from the second year
> > onwards:
> >
> > era "+:2:1990//01//01:+*:<U5E73><U6210>:%EC%Ey<U5E74>";/
> > "+:1:1989//01//08:1989//12//31:<U5E73><U6210>:%EC<U5143><U5E74>";/
>
> I'm talking specifically about '%Ey'.
>
> Let me ask my question differently.
>
> Could someone want to output:
>
> "%EC %Ey nen"
>
> The equivalnet of %EY, but with spaces, and *also* want %Ey to be
> "gan" in the first year?
>
> I see two choices:
>
> (1) %Ey is always an arabic numeral year-of-era.
>
> (2) %Ey is always an arabic numeral year-of-era, except for the first
> year when it is "gan".
>
> It sounds like (2) is not that important because %EY already provides
> this for you in a compact form.
For "%Ey", in order to implement such an alternative, it would be
possible to control (1) and (2) with a certain optional flag, but I
think that hard coding for a specific locale would not be desirable.
> Java suffers from this problem because they don't have the equivalent
> of %EY, they have only 'G' (era name) and 'y' (year-of-era) and their
> 'y' is always arabic numerals.
>
> https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Sorry, I am almost unfamiliar with Java.
According to the following page (sorry, Japanese page), there is
description about the output as "gan nen".
https://qiita.com/yamadamn/items/56e7370bae2ceaec55d5
It was judged not to fix in the past that the Date and Time API can
not output as "gan nen".
https://bugs.openjdk.java.net/browse/JDK-8068571
It is that the output as "gan nen" is to use Mapped-value of
DateTimeFormatterBuilder.
Unfortunately, since it was gradually modified, both parsing and
formatting are enabled in this way since Java 12.
Hopefully, it will be backported to 11, though.
https://bugs.openjdk.java.net/browse/JDK-8042131
https://bugs.openjdk.java.net/browse/JDK-8210633
Regards,
TAMUKI Shoichi