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: [PATCH v6 1/2] strftime: Set the default width of "%Ey" to 2 [BZ #23758]


Hello Rafal and Zack,

From: Rafal Luzynski <digitalfreak@lingonborough.com>
Subject: Re: [PATCH v6 1/2] strftime: Set the default width of "%Ey" to 2 [BZ #23758]
Date: Fri, 18 Jan 2019 19:44:39 +0100 (CET)

> > OK, I understand.  I think "nengo" and "gengo" are nearly synonymous,
> > and "gengo" seems to be used more often in Japan.  These mean "era
> > name" (%EC).  On the other hand, "the year of the (current) era" means
> > "the numeric era year" (%Ey).
> 
> "The numeric era year" sounds unclear for me.  I think you mean
> "the number of the year" or "the number of the year in the current era"
> or anything like that.

I was concerned about the word "current" from a while ago.  "%Ey" does
not necessarily indicate the year of the current era.  For example:

$ LANG=ja_JP.UTF-8 date -d "2018-04-01" +"%Ey"
30
$ LANG=ja_JP.UTF-8 date -d "1955-04-01" +"%Ey"
30

The former era name is "Heisei", the latter era name is "Showa".

I think that the same thing can be said in the Christian era:

$ date -d "2018-04-01" +"%y"
18
$ date -d "1918-04-01" +"%y"
18

The former is the 21st century, the latter is the 20th century.

Therefore, I think that the word "current" should not be used here.

Based on this, can we drop the word "current" about the commit message
in the first patch?

| In Japanese locales, strftime's alternative year format (%Ey) produces
| the year of the current era.  A new era typically begins when a new
| emperor is enthroned.  The year of the current era is therefore
| usually a one- or two-digit number.

In addition, is "In Japanese locales," correct?

Perhaps, is "In Japanese locale," better?

The manual in the second patch also had the word "current".  Can we
similarly drop the word "current"?

| If the @code{E} modifier is specified (@code{%EC}), instead produces
| the name of the period for the current year (e.g. an era name) in the
| locale's alternative calendar.

Regards,
TAMUKI Shoichi


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