Kaydet (Commit) cacbb0fa authored tarafından Eike Rathke's avatar Eike Rathke

Prepare for "Japan's Y2K" Gengou calendar era switch after 2019-04-30

The emperor Akihito will abdicate on 2019-04-30. The next emperor
will be Naruhito, but so far neither the new era name (Heisei for
Akihito) nor its abbreviation or a Unicode character are
determined. At least introduce the new era with some dummy names
(Naruhito,Na,N).

Change-Id: I8c0af390ca0408ac259e47e7eaf2e49b5889c9ba
Reviewed-on: https://gerrit.libreoffice.org/58142Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst a0a8c958
......@@ -205,10 +205,11 @@ Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const css::lang::Loc
}
static const Era gengou_eraArray[] = {
{1868, 1, 1, 0},
{1912, 7, 30, 0},
{1926, 12, 25, 0},
{1989, 1, 8, 0},
{1868, 1, 1, 0}, // Meiji
{1912, 7, 30, 0}, // Taisho
{1926, 12, 25, 0}, // Showa
{1989, 1, 8, 0}, // Heisei
{2019, 5, 1, 0}, //(Naruhito) (TODO: real era name not known yet (2018-07-26))
{0, 0, 0, 0}
};
Calendar_gengou::Calendar_gengou() : Calendar_gregorian(gengou_eraArray)
......
......@@ -480,6 +480,13 @@
<DefaultAbbrvName></DefaultAbbrvName>
<DefaultFullName>平成</DefaultFullName>
</Era>
<Era>
<!-- TODO: Naruhito is only the emperor's name, the era name and
abbreviation and full name are not known yet (2018-07-26) -->
<EraID>Naruhito</EraID>
<DefaultAbbrvName>Na</DefaultAbbrvName>
<DefaultFullName>Naruhito</DefaultFullName>
</Era>
</Eras>
<StartDayOfWeek>
<DayID>sun</DayID>
......
......@@ -3409,6 +3409,9 @@ void SvNumberformat::ImpAppendEraG( OUStringBuffer& OutString,
case 4:
cEra = 'H';
break;
case 5:
cEra = 'N'; /* TODO: the real one letter era name is not known yet (2018-07-26) */
break;
default:
cEra = '?';
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment