Skip to content

Commit 466afec

Browse files
committed
ja_JP locale: Add entry for the new Japanese era [BZ #22964]
The Japanese era name will be changed on May 1, 2019. The Japanese government made a preliminary announcement on April 1, 2019. The glibc ja_JP locale must be updated to include the new era name for strftime's alternative year format support. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> ChangeLog: [BZ #22964] * localedata/locales/ja_JP (LC_TIME): Add entry for the new Japanese era. * time/tst-strftime2.c (dates): Add 2019-04-30 and 2019-05-01. (mkreftable): Add rules for the new Japanese era and the new dates.
1 parent 84aea16 commit 466afec

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2019-04-02 TAMUKI Shoichi <tamuki@linet.gr.jp>
2+
3+
[BZ #22964]
4+
* localedata/locales/ja_JP (LC_TIME): Add entry for the new Japanese
5+
era.
6+
* time/tst-strftime2.c (dates): Add 2019-04-30 and 2019-05-01.
7+
(mkreftable): Add rules for the new Japanese era and the new dates.
8+
19
2019-04-02 TAMUKI Shoichi <tamuki@linet.gr.jp>
210
Rafal Luzynski <digitalfreak@lingonborough.com>
311

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Major new features:
2222
alternative calendar for the following locales: zh_TW, cmn_TW, hak_TW,
2323
nan_TW, lzh_TW.
2424

25+
* The entry for the new Japanese era has been added for ja_JP locale.
26+
2527
Deprecated and removed features, and other changes affecting compatibility:
2628

2729
* The functions clock_gettime, clock_getres, clock_settime,

localedata/locales/ja_JP

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14952,7 +14952,7 @@ t_fmt_ampm "%p%I<U6642>%M<U5206>%S<U79D2>"
1495214952
%
1495314953
% The following dates and their names are recorded below in descending
1495414954
% date order (note that <U5E74> or <NEN> follows each date).
14955-
% <HEISEI> -> <SHOWA> -> <TAISHO> -> <MEIJI> -> <AD> -> <BC>
14955+
% <REIWA> -> <HEISEI> -> <SHOWA> -> <TAISHO> -> <MEIJI> -> <AD> -> <BC>
1495614956
%
1495714957
% Each string is an era description segment with the format:
1495814958
% "direction:offset:start_date:end_date:era_name:era_format"
@@ -14964,7 +14964,9 @@ t_fmt_ampm "%p%I<U6642>%M<U5206>%S<U79D2>"
1496414964
% - The last entry <U7D00><U5143><U524D> in era_name means BC.
1496514965
% - The second-to-last entry <U897F><U66A6> in era_name means AD.
1496614966
%
14967-
era "+:2:1990//01//01:+*:<U5E73><U6210>:%EC%Ey<U5E74>";/
14967+
era "+:2:2020//01//01:+*:<U4EE4><U548C>:%EC%Ey<U5E74>";/
14968+
"+:1:2019//05//01:2019//12//31:<U4EE4><U548C>:%EC<U5143><U5E74>";/
14969+
"+:2:1990//01//01:2019//04//30:<U5E73><U6210>:%EC%Ey<U5E74>";/
1496814970
"+:1:1989//01//08:1989//12//31:<U5E73><U6210>:%EC<U5143><U5E74>";/
1496914971
"+:2:1927//01//01:1989//01//07:<U662D><U548C>:%EC%Ey<U5E74>";/
1497014972
"+:1:1926//12//25:1926//12//31:<U662D><U548C>:%EC<U5143><U5E74>";/

time/tst-strftime2.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ static const date_t dates[] =
6161
{ 1, 4, 1997 },
6262
{ 1, 4, 1998 },
6363
{ 1, 4, 2010 },
64-
{ 1, 4, 2011 }
64+
{ 1, 4, 2011 },
65+
{ 30, 4, 2019 },
66+
{ 1, 5, 2019 }
6567
};
6668

6769
static char ref[array_length (locales)][array_length (formats)]
@@ -91,20 +93,20 @@ mkreftable (void)
9193
static const int yrj[] =
9294
{
9395
43, 44, 45, 2,
94-
63, 64, 1, 2, 9, 10, 22, 23
96+
63, 64, 1, 2, 9, 10, 22, 23, 31, 1
9597
};
9698
/* Buddhist calendar year to be checked. */
9799
static const int yrb[] =
98100
{
99101
2453, 2454, 2455, 2456,
100-
2531, 2532, 2532, 2533, 2540, 2541, 2553, 2554
102+
2531, 2532, 2532, 2533, 2540, 2541, 2553, 2554, 2562, 2562
101103
};
102104
/* R.O.C. calendar year to be checked. Negative number is prior to
103105
Minguo counting up. */
104106
static const int yrc[] =
105107
{
106108
-2, -1, 1, 2,
107-
77, 78, 78, 79, 86, 87, 99, 100
109+
77, 78, 78, 79, 86, 87, 99, 100, 108, 108
108110
};
109111

110112
for (i = 0; i < array_length (locales); i++)
@@ -116,7 +118,8 @@ mkreftable (void)
116118
era = (is_before (k, 30, 7, 1912)) ? "\u660e\u6cbb"
117119
: (is_before (k, 25, 12, 1926)) ? "\u5927\u6b63"
118120
: (is_before (k, 8, 1, 1989)) ? "\u662d\u548c"
119-
: "\u5e73\u6210";
121+
: (is_before (k, 1, 5, 2019)) ? "\u5e73\u6210"
122+
: "\u4ee4\u548c";
120123
yr = yrj[k], sfx = "\u5e74";
121124
}
122125
else if (i == lo_LA)

0 commit comments

Comments
 (0)