[Bug localedata/24162] ja_JP LC_TIME: era offset for Taisho GanNen and BC direction

tamuki at linet dot gr.jp sourceware-bugzilla@sourceware.org
Thu Feb 7 06:17:00 GMT 2019


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

--- Comment #5 from TAMUKI Shoichi <tamuki at linet dot gr.jp> ---
Hello Morimitsu-san,

(In reply to junji morimitsu from comment #0)
> 2:  The offset of Taisho Gan Nen (1912) is '2', but it should be '1'.
>     Gan Nen means the 1st year, Taisho started on 1912-07-30.

Yes, you are right.  Probably, this typo was introduced when creating
ja_JP localedata, but it has been overlooked so far.  I think it sould
be corrected.

> 3:  The direction of BC is '+', but it should be '-'.  The start_date
>     (-1/12/31) is the last day of BC.  The direction is backward.
>     However I cannot show how to use this flag.  Only decoration?

There is no need to change this:

$ date -d "2016 years ago" +"%EY"
西暦03年
$ date -d "2017 years ago" +"%EY"
西暦02年
$ date -d "2018 years ago" +"%EY"
西暦01年
$ date -d "2019 years ago" +"%EY"
紀元前01年
$ date -d "2020 years ago" +"%EY"
紀元前02年
$ date -d "2021 years ago" +"%EY"
紀元前03年

If you change '+' to '-', it will be as follows:

$ date -d "2016 years ago" +"%EY"
西暦03年
$ date -d "2017 years ago" +"%EY"
西暦02年
$ date -d "2018 years ago" +"%EY"
西暦01年
$ date -d "2019 years ago" +"%EY"
紀元前01年
$ date -d "2020 years ago" +"%EY"
紀元前00年
$ date -d "2021 years ago" +"%EY"
紀元前-1年

Regards,
TAMUKI Shoichi

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libc-locales mailing list