This is the mail archive of the libc-alpha@sourceware.org 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: Japanese Era name change and named vs. numbered era date.


Hello Carlos-san,

From: Carlos O'Donell <carlos@redhat.com>
Subject: Japanese Era name change and named vs. numbered era date.
Date: Tue, 29 Jan 2019 13:33:26 -0500

> Is it important to describe the first era year as "gan"
> versus "1"? Or to allow the user to control this?

# The above kanji character is correct, but for my mail client, it may
# not be able to be sent correctly, so I replaced it with romaji.

Good point.  It is important to describe the first era year as "gan"
like "Heisei gan nen".  The law and the ordinance promulgated or
enforced in 1989 have the notation "Heisei gan nen".  Although "Heisei
1 nen" is not a mistake, it is not commonly used.

> This particular issue was raised as a Java issue, where
> "Gy" via DateTimeFormatter can print [Era name][Era year],
> but does so with [Era year] as a number (arabic numeral).

As Rafal-san mentioned, it is already implemented in Glibc.  Please
see the attachment of below:

https://www.sourceware.org/ml/libc-alpha/2019-01/msg00554.html

"%EY" is correctly described as above.  In contrast, "%Ey" is
described in Arabic numerals.  It is used when you need to be a
number, such as when calculating the year.  If you dare want to
describe as "Heisei 01 year", you can use "%EC%Ey" instead of "%EY".

> I don't know how you would implement such an alternative
> because it would require enumerating all of the possible
> non-arabic-numeral alternatives. It would be an interesting
> addition, but I'm not sure it is valuable to do it this way.

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>";/

Regards,
TAMUKI Shoichi


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