This is the mail archive of the 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] ja_JP locale: Fix the offset in era-string for Taisho gan-nen [BZ #24162]

Hello TAMUKI-san,

I am sorry for this long silence.  I have tested your patch and here is
what it does:

1. Non-patched version:

$ LC_ALL=ja_JP.utf8 date -d "1913-04-05" +"%d %m %Ey"
05 04 2
$ LC_ALL=ja_JP.utf8 date -d "1912-11-22" +"%d %m %Ey"
22 11 2

2. Patched version:

$ LC_ALL=ja_JP.UTF-8 ./ /usr/bin/date -d "1913-04-05" +"%d %m
05 04 02
$ LC_ALL=ja_JP.UTF-8 ./ /usr/bin/date -d "1912-11-22" +"%d %m
22 11 01

So the issue is that the year 1912 (or at least part of it) is
displayed as the year 2 while it should be 1 and year 2 should
be only 1913, and this patch fixes it, is that correct?

Your patch is correct, I have only few nitpicks which you may
agree with or ignore, they don't change much in your patch.

Could you please shorten the first line of your patch, which is also
the subject line of your email?  If it was only 1 character shorter
it would fit in one line when listing with "git log --oneline" on
a traditional 80-columns terminal.  I think that if you remove the
word "locale" it is OK.  No problem if you don't want to change it,
some people do not keep the 72 columns limit and nobody complains.

8.02.2019 09:41 TAMUKI Shoichi <> wrote:
> The offset in era-string format for Taisho gan-nen (1912) is currently
> defined as 2, but it should be 1.  So fix it.  "gan-nen" means the 1st

Is is obligatory to write "gan-nen" in lowercase characters even if
it is in the beginning of a sentence, like Unix command names which are
case sensitive and therefore always written in lowercase?  If it does
not break some rules which I am not aware of then please change to

> (origin) year, Taisho started on Jul 30, 1912.

I think it is OK to write unabbreviated "July" here.

> ChangeLog:
> 	[BZ #24162]
> 	* localedata/locales/ja_JP (LC_TIME): The offset in era-string format

Somebody fix me if I'm wrong but I usually write here:

	* localedata/locales/ja_JP (era):

> 	for Taisho gan-nen is currently defined as 2, but it should be 1.  So
> 	fix it.

I can't find the proper reference now but AFAIR the changes should be
in an imperative mode, something like:

    Change the offset for Taisho gan-nen from 2 to 1.

No need to mention the era-string because we have already narrowed our
down to the era.

You don't have to take this literally, just take it as an inspiration to
according to your actual needs.

Also, the ChangeLog entries do not have to be exact copies of the commit
It's even better when they are shorter and the commit message contains the

> diff --git a/localedata/locales/ja_JP b/localedata/locales/ja_JP
> index 1fd2fee..9bfbb2b 100644
> --- a/localedata/locales/ja_JP
> +++ b/localedata/locales/ja_JP
> @@ -14951,7 +14951,7 @@ era
> "+:2:1990//01//01:+*:<U5E73><U6210>:%EC%Ey<U5E74>";/
>  	"+:2:1927//01//01:1989//01//07:<U662D><U548C>:%EC%Ey<U5E74>";/
>  	"+:1:1926//12//25:1926//12//31:<U662D><U548C>:%EC<U5143><U5E74>";/
>  	"+:2:1913//01//01:1926//12//24:<U5927><U6B63>:%EC%Ey<U5E74>";/
> -	"+:2:1912//07//30:1912//12//31:<U5927><U6B63>:%EC<U5143><U5E74>";/
> +	"+:1:1912//07//30:1912//12//31:<U5927><U6B63>:%EC<U5143><U5E74>";/
>  	"+:6:1873//01//01:1912//07//29:<U660E><U6CBB>:%EC%Ey<U5E74>";/
>  	"+:1:0001//01//01:1872//12//31:<U897F><U66A6>:%EC%Ey<U5E74>";/
>  	"+:1:-0001//12//31:-*:<U7D00><U5143><U524D>:%EC%Ey<U5E74>"

OK with the remarks mentioned above.

Reviewed-by: Rafal Luzynski <>

Also I think that the issue is important and this patch does not depend
on other patches so it is also OK to backport it to old stable branches.
However, I'd like to hear an opinion of other maintainers about it.

15.02.2019 08:41 TAMUKI Shoichi <> wrote:
> [...]
> This issue is reported by "junji morimitsu" via Bugzilla [1].
> [1]
> So, I would like to use the Reported-by: tag for him with his
> permission.  Is that all right?

I think we are not using "Reported-by:" tag officially.  So if you want
to credit the bug reporter you may just mention him/her in the free text
part of the commit message.  Finally, it's not hurting if you use the
"Reported-by:" tag, it will just do nothing.

Thank you for your patch, please commit, optionally after applying
my remarks.



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