Skip to content

Commit 99f1b7c

Browse files
ptomatoMs2ger
authored andcommitted
Intl Era Monthcode: Update Meiji era start date
See tc39/proposal-intl-era-monthcode#102 The historical regnal period starts on 1868-10-23 but at that point the lunisolar calendar was still in use. On 1873-01-01 we start using the era code "meiji", before that we use eras and era years identical to the "gregory" calendar.
1 parent e85173b commit 99f1b7c

21 files changed

+231
-169
lines changed

test/intl402/Temporal/PlainDate/from/era-boundary-japanese.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ TemporalHelpers.assertPlainDate(
115115
1868, 10, "M10", 22, "Meiji 1 resolves to CE 1868 before era start date",
116116
"ce", 1868);
117117

118+
const meiji1AfterStart = Temporal.PlainDate.from({ era: "meiji", eraYear: 1, monthCode: "M10", day: 23, calendar }, options);
119+
TemporalHelpers.assertPlainDate(
120+
meiji1AfterStart,
121+
1868, 10, "M10", 23, "Meiji 1 still resolves to CE 1868 after era start date",
122+
"ce", 1868);
123+
124+
const meiji5 = Temporal.PlainDate.from({ era: "meiji", eraYear: 5, monthCode: "M12", day: 31, calendar }, options);
125+
TemporalHelpers.assertPlainDate(
126+
meiji5,
127+
1872, 12, "M12", 31, "Meiji 5 resolves to CE 1872",
128+
"ce", 1872);
129+
130+
const ce1873 = Temporal.PlainDate.from({ era: "ce", eraYear: 1873, monthCode: "M01", day: 1, calendar }, options);
131+
TemporalHelpers.assertPlainDate(
132+
ce1873,
133+
1873, 1, "M01", 1, "CE 1873 resolves to Meiji 6",
134+
"meiji", 6);
135+
118136
const meiji0 = Temporal.PlainDate.from({ era: "meiji", eraYear: 0, monthCode: "M10", day: 23, calendar }, options);
119137
TemporalHelpers.assertPlainDate(
120138
meiji0,
@@ -127,12 +145,6 @@ TemporalHelpers.assertPlainDate(
127145
1866, 10, "M10", 23, "Meiji -1 resolves to CE 1866",
128146
"ce", 1866);
129147

130-
const ce1868AfterStart = Temporal.PlainDate.from({ era: "ce", eraYear: 1868, monthCode: "M10", day: 23, calendar }, options);
131-
TemporalHelpers.assertPlainDate(
132-
ce1868AfterStart,
133-
1868, 10, "M10", 23, "CE 1868 resolves to Meiji 1 after era start date",
134-
"meiji", 1);
135-
136148
const ce0 = Temporal.PlainDate.from({ era: "ce", eraYear: 0, monthCode: "M01", day: 1, calendar }, options);
137149
TemporalHelpers.assertPlainDate(
138150
ce0,

test/intl402/Temporal/PlainDate/from/era-japanese.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const reiwa = Temporal.PlainDate.from({ era: "reiwa", eraYear: 2, month: 1, day:
1515
const heisei = Temporal.PlainDate.from({ era: "heisei", eraYear: 2, month: 1, day: 1, calendar });
1616
const showa = Temporal.PlainDate.from({ era: "showa", eraYear: 2, month: 1, day: 1, calendar });
1717
const taisho = Temporal.PlainDate.from({ era: "taisho", eraYear: 2, month: 1, day: 1, calendar });
18-
const meiji = Temporal.PlainDate.from({ era: "meiji", eraYear: 2, month: 1, day: 1, calendar });
18+
const meiji = Temporal.PlainDate.from({ era: "meiji", eraYear: 6, month: 1, day: 1, calendar });
1919
const ce = Temporal.PlainDate.from({ era: "ce", eraYear: 1000, month: 1, day: 1, calendar });
2020
const bce = Temporal.PlainDate.from({ era: "bce", eraYear: 1, month: 1, day: 1, calendar });
2121

@@ -27,7 +27,7 @@ TemporalHelpers.assertPlainDate(showa, 1927, 1, "M01", 1, `${showa}`, "showa",
2727

2828
TemporalHelpers.assertPlainDate(taisho, 1913, 1, "M01", 1, `${taisho}`, "taisho", 2);
2929

30-
TemporalHelpers.assertPlainDate(meiji, 1869, 1, "M01", 1, `${meiji}`, "meiji", 2);
30+
TemporalHelpers.assertPlainDate(meiji, 1873, 1, "M01", 1, `${meiji}`, "meiji", 6);
3131

3232
TemporalHelpers.assertPlainDate(ce, 1000, 1, "M01", 1, `${ce} (CE)`, "ce", 1000);
3333

test/intl402/Temporal/PlainDate/prototype/since/era-boundary-japanese.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const options = { overflow: "reject" };
1313

1414
const bce1 = Temporal.PlainDate.from({ era: "bce", eraYear: 1, monthCode: "M06", day: 1, calendar }, options);
1515
const ce1 = Temporal.PlainDate.from({ era: "ce", eraYear: 1, monthCode: "M06", day: 1, calendar }, options);
16-
const ce1868 = Temporal.PlainDate.from({ era: "ce", eraYear: 1868, monthCode: "M10", day: 22, calendar }, options);
17-
const meiji1 = Temporal.PlainDate.from({ era: "meiji", eraYear: 1, monthCode: "M10", day: 23, calendar}, options);
18-
const meiji5 = Temporal.PlainDate.from({ era: "meiji", eraYear: 5, monthCode: "M01", day: 15, calendar }, options);
16+
const ce1872 = Temporal.PlainDate.from({ era: "ce", eraYear: 1872, monthCode: "M12", day: 31, calendar }, options);
17+
const meiji6 = Temporal.PlainDate.from({ era: "meiji", eraYear: 6, monthCode: "M01", day: 1, calendar}, options);
18+
const meiji7 = Temporal.PlainDate.from({ era: "meiji", eraYear: 7, monthCode: "M01", day: 15, calendar }, options);
1919
const meiji45 = Temporal.PlainDate.from({ era: "meiji", eraYear: 45, monthCode: "M05", day: 19, calendar }, options);
2020
const taisho1 = Temporal.PlainDate.from({ era: "taisho", eraYear: 1, monthCode: "M08", day: 9, calendar }, options);
2121
const taisho6 = Temporal.PlainDate.from({ era: "taisho", eraYear: 6, monthCode: "M03", day: 15, calendar }, options);
@@ -96,18 +96,16 @@ const tests = [
9696
[0, 7, 0, 10, "7mo 10d from Taisho 15 July 20 to Showa 1 December 30"],
9797
[0, 7, 0, 10, "7mo 10d from Taisho 15 July 20 to Showa 1 December 30"],
9898
],
99-
// From Meiji 5 (1872) to Taisho 6 (1917) - crossing era boundary
100-
// Note that contemporarily January 15 1872 would have been Meiji 4 in the
101-
// pre-1873 lunisolar calendar, but the spec-mandated behaviour is proleptic
99+
// From Meiji 7 (1874) to Taisho 6 (1917) - crossing era boundary
102100
[
103-
meiji5, taisho6,
104-
[-45, -2, 0, 0, "-45y -2mo backwards from Meiji 5 January to Taisho 6 March"],
105-
[0, -542, 0, 0, "-542mo backwards from Meiji 5 January to Taisho 6 March"],
101+
meiji7, taisho6,
102+
[-43, -2, 0, 0, "-43y -2mo backwards from Meiji 7 January to Taisho 6 March"],
103+
[0, -518, 0, 0, "-518mo backwards from Meiji 7 January to Taisho 6 March"],
106104
],
107105
[
108-
taisho6, meiji5,
109-
[45, 2, 0, 0, "45y 2mo from Meiji 5 January to Taisho 6 March"],
110-
[0, 542, 0, 0, "542mo from Meiji 5 January to Taisho 6 March"],
106+
taisho6, meiji7,
107+
[43, 2, 0, 0, "43y 2mo from Meiji 7 January to Taisho 6 March"],
108+
[0, 518, 0, 0, "518mo from Meiji 7 January to Taisho 6 March"],
111109
],
112110
// Within same year but different eras
113111
[
@@ -120,16 +118,16 @@ const tests = [
120118
[0, 2, 0, 21, "2mo 21d from Meiji 45 May 19 to Taisho 1 August 9"],
121119
[0, 2, 0, 21, "2mo 21d from Meiji 45 May 19 to Taisho 1 August 9"],
122120
],
123-
// Last pre-Meiji day to first day of Meiji era
121+
// Last pre-solar-calendar CE day to first solar-calendar day of Meiji era
124122
[
125-
ce1868, meiji1,
126-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
127-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
123+
ce1872, meiji6,
124+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
125+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
128126
],
129127
[
130-
meiji1, ce1868,
131-
[0, 0, 0, 1, "from day before Meiji era to first day"],
132-
[0, 0, 0, 1, "from day before Meiji era to first day"],
128+
meiji6, ce1872,
129+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
130+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
133131
],
134132
// CE-BCE boundary
135133
[

test/intl402/Temporal/PlainDate/prototype/until/era-boundary-japanese.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const options = { overflow: "reject" };
1313

1414
const bce1 = Temporal.PlainDate.from({ era: "bce", eraYear: 1, monthCode: "M06", day: 1, calendar }, options);
1515
const ce1 = Temporal.PlainDate.from({ era: "ce", eraYear: 1, monthCode: "M06", day: 1, calendar }, options);
16-
const ce1868 = Temporal.PlainDate.from({ era: "ce", eraYear: 1868, monthCode: "M10", day: 22, calendar }, options);
17-
const meiji1 = Temporal.PlainDate.from({ era: "meiji", eraYear: 1, monthCode: "M10", day: 23, calendar}, options);
18-
const meiji5 = Temporal.PlainDate.from({ era: "meiji", eraYear: 5, monthCode: "M01", day: 15, calendar }, options);
16+
const ce1872 = Temporal.PlainDate.from({ era: "ce", eraYear: 1872, monthCode: "M12", day: 31, calendar }, options);
17+
const meiji6 = Temporal.PlainDate.from({ era: "meiji", eraYear: 6, monthCode: "M01", day: 1, calendar}, options);
18+
const meiji7 = Temporal.PlainDate.from({ era: "meiji", eraYear: 7, monthCode: "M01", day: 15, calendar }, options);
1919
const meiji45 = Temporal.PlainDate.from({ era: "meiji", eraYear: 45, monthCode: "M05", day: 19, calendar }, options);
2020
const taisho1 = Temporal.PlainDate.from({ era: "taisho", eraYear: 1, monthCode: "M08", day: 9, calendar }, options);
2121
const taisho6 = Temporal.PlainDate.from({ era: "taisho", eraYear: 6, monthCode: "M03", day: 15, calendar }, options);
@@ -96,18 +96,16 @@ const tests = [
9696
[0, -7, 0, -10, "-7mo -10d backwards from Taisho 15 July 20 to Showa 1 December 30"],
9797
[0, -7, 0, -10, "-7mo -10d backwards from Taisho 15 July 20 to Showa 1 December 30"],
9898
],
99-
// From Meiji 5 (1872) to Taisho 6 (1917) - crossing era boundary
100-
// Note that contemporarily January 15 1872 would have been Meiji 4 in the
101-
// pre-1873 lunisolar calendar, but the spec-mandated behaviour is proleptic
99+
// From Meiji 7 (1874) to Taisho 6 (1917) - crossing era boundary
102100
[
103-
meiji5, taisho6,
104-
[45, 2, 0, 0, "45y 2mo from Meiji 5 January to Taisho 6 March"],
105-
[0, 542, 0, 0, "542mo from Meiji 5 January to Taisho 6 March"],
101+
meiji7, taisho6,
102+
[43, 2, 0, 0, "43y 2mo from Meiji 7 January to Taisho 6 March"],
103+
[0, 518, 0, 0, "518mo from Meiji 7 January to Taisho 6 March"],
106104
],
107105
[
108-
taisho6, meiji5,
109-
[-45, -2, 0, 0, "-45y -2mo backwards from Meiji 5 January to Taisho 6 March"],
110-
[0, -542, 0, 0, "-542mo backwards from Meiji 5 January to Taisho 6 March"],
106+
taisho6, meiji7,
107+
[-43, -2, 0, 0, "-43y -2mo backwards from Meiji 7 January to Taisho 6 March"],
108+
[0, -518, 0, 0, "-518mo backwards from Meiji 7 January to Taisho 6 March"],
111109
],
112110
// Within same year but different eras
113111
[
@@ -120,16 +118,16 @@ const tests = [
120118
[0, -2, 0, -21, "-2mo -21d backwards from Meiji 45 May 19 to Taisho 1 August 9"],
121119
[0, -2, 0, -21, "-2mo -21d backwards from Meiji 45 May 19 to Taisho 1 August 9"],
122120
],
123-
// Last pre-Meiji day to first day of Meiji era
121+
// Last pre-solar-calendar CE day to first solar-calendar day of Meiji era
124122
[
125-
ce1868, meiji1,
126-
[0, 0, 0, 1, "from day before Meiji era to first day"],
127-
[0, 0, 0, 1, "from day before Meiji era to first day"],
123+
ce1872, meiji6,
124+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
125+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
128126
],
129127
[
130-
meiji1, ce1868,
131-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
132-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
128+
meiji6, ce1872,
129+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
130+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
133131
],
134132
// CE-BCE boundary
135133
[

test/intl402/Temporal/PlainDate/prototype/year/arithmetic-year.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const tests = {
102102
[{ era: "bce", eraYear: 2, monthCode: "M06", day: 14 }, -1],
103103
[{ era: "bce", eraYear: 1, monthCode: "M12", day: 3 }, 0],
104104
[{ era: "ce", eraYear: 1, monthCode: "M07", day: 26 }, 1],
105-
[{ era: "meiji", eraYear: 1, monthCode: "M12", day: 31 }, 1868],
105+
[{ era: "meiji", eraYear: 6, monthCode: "M12", day: 31 }, 1873],
106106
[{ era: "taisho", eraYear: 1, monthCode: "M12", day: 31 }, 1912],
107107
[{ era: "showa", eraYear: 1, monthCode: "M12", day: 31 }, 1926],
108108
[{ era: "heisei", eraYear: 1, monthCode: "M12", day: 31 }, 1989],

test/intl402/Temporal/PlainDateTime/from/era-boundary-japanese.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ TemporalHelpers.assertPlainDateTime(
115115
1868, 10, "M10", 22, 12, 34, 0, 0, 0, 0, "Meiji 1 resolves to CE 1868 before era start date",
116116
"ce", 1868);
117117

118+
const meiji1AfterStart = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 1, monthCode: "M10", day: 23, hour: 12, minute: 34, calendar }, options);
119+
TemporalHelpers.assertPlainDateTime(
120+
meiji1AfterStart,
121+
1868, 10, "M10", 23, 12, 34, 0, 0, 0, 0, "Meiji 1 still resolves to CE 1868 after era start date",
122+
"ce", 1868);
123+
124+
const meiji5 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 5, monthCode: "M12", day: 31, hour: 12, minute: 34, calendar }, options);
125+
TemporalHelpers.assertPlainDateTime(
126+
meiji5,
127+
1872, 12, "M12", 31, 12, 34, 0, 0, 0, 0, "Meiji 5 resolves to CE 1872",
128+
"ce", 1872);
129+
130+
const ce1873 = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1873, monthCode: "M01", day: 1, hour: 12, minute: 34, calendar }, options);
131+
TemporalHelpers.assertPlainDateTime(
132+
ce1873,
133+
1873, 1, "M01", 1, 12, 34, 0, 0, 0, 0, "CE 1873 resolves to Meiji 6",
134+
"meiji", 6);
135+
118136
const meiji0 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 0, monthCode: "M10", day: 23, hour: 12, minute: 34, calendar }, options);
119137
TemporalHelpers.assertPlainDateTime(
120138
meiji0,
@@ -127,12 +145,6 @@ TemporalHelpers.assertPlainDateTime(
127145
1866, 10, "M10", 23, 12, 34, 0, 0, 0, 0, "Meiji -1 resolves to CE 1866",
128146
"ce", 1866);
129147

130-
const ce1868AfterStart = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1868, monthCode: "M10", day: 23, hour: 12, minute: 34, calendar }, options);
131-
TemporalHelpers.assertPlainDateTime(
132-
ce1868AfterStart,
133-
1868, 10, "M10", 23, 12, 34, 0, 0, 0, 0, "CE 1868 resolves to Meiji 1 after era start date",
134-
"meiji", 1);
135-
136148
const ce0 = Temporal.PlainDateTime.from({ era: "ce", eraYear: 0, monthCode: "M01", day: 1, hour: 12, minute: 34, calendar }, options);
137149
TemporalHelpers.assertPlainDateTime(
138150
ce0,

test/intl402/Temporal/PlainDateTime/from/era-japanese.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const reiwa = Temporal.PlainDateTime.from({ era: "reiwa", eraYear: 2, month: 1,
1515
const heisei = Temporal.PlainDateTime.from({ era: "heisei", eraYear: 2, month: 1, day: 1, hour: 12, minute: 34, calendar });
1616
const showa = Temporal.PlainDateTime.from({ era: "showa", eraYear: 2, month: 1, day: 1, hour: 12, minute: 34, calendar });
1717
const taisho = Temporal.PlainDateTime.from({ era: "taisho", eraYear: 2, month: 1, day: 1, hour: 12, minute: 34, calendar });
18-
const meiji = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 2, month: 1, day: 1, hour: 12, minute: 34, calendar });
18+
const meiji = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 6, month: 1, day: 1, hour: 12, minute: 34, calendar });
1919
const ce = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1000, month: 1, day: 1, hour: 12, minute: 34, calendar });
2020
const bce = Temporal.PlainDateTime.from({ era: "bce", eraYear: 1, month: 1, day: 1, hour: 12, minute: 34, calendar });
2121

@@ -27,7 +27,7 @@ TemporalHelpers.assertPlainDateTime(showa, 1927, 1, "M01", 1, 12, 34, 0, 0, 0, 0
2727

2828
TemporalHelpers.assertPlainDateTime(taisho, 1913, 1, "M01", 1, 12, 34, 0, 0, 0, 0, `${taisho}`, "taisho", 2);
2929

30-
TemporalHelpers.assertPlainDateTime(meiji, 1869, 1, "M01", 1, 12, 34, 0, 0, 0, 0, `${meiji}`, "meiji", 2);
30+
TemporalHelpers.assertPlainDateTime(meiji, 1873, 1, "M01", 1, 12, 34, 0, 0, 0, 0, `${meiji}`, "meiji", 6);
3131

3232
TemporalHelpers.assertPlainDateTime(ce, 1000, 1, "M01", 1, 12, 34, 0, 0, 0, 0, `${ce} (CE)`, "ce", 1000);
3333

test/intl402/Temporal/PlainDateTime/prototype/since/era-boundary-japanese.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const options = { overflow: "reject" };
1313

1414
const bce1 = Temporal.PlainDateTime.from({ era: "bce", eraYear: 1, monthCode: "M06", day: 1, hour: 12, minute: 34, calendar }, options);
1515
const ce1 = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1, monthCode: "M06", day: 1, hour: 12, minute: 34, calendar }, options);
16-
const ce1868 = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1868, monthCode: "M10", day: 22, hour: 12, minute: 34, calendar }, options);
17-
const meiji1 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 1, monthCode: "M10", day: 23, hour: 12, minute: 34, calendar}, options);
18-
const meiji5 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 5, monthCode: "M01", day: 15, hour: 12, minute: 34, calendar }, options);
16+
const ce1872 = Temporal.PlainDateTime.from({ era: "ce", eraYear: 1872, monthCode: "M12", day: 31, hour: 12, minute: 34, calendar }, options);
17+
const meiji6 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 6, monthCode: "M01", day: 1, hour: 12, minute: 34, calendar}, options);
18+
const meiji7 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 7, monthCode: "M01", day: 15, hour: 12, minute: 34, calendar }, options);
1919
const meiji45 = Temporal.PlainDateTime.from({ era: "meiji", eraYear: 45, monthCode: "M05", day: 19, hour: 12, minute: 34, calendar }, options);
2020
const taisho1 = Temporal.PlainDateTime.from({ era: "taisho", eraYear: 1, monthCode: "M08", day: 9, hour: 12, minute: 34, calendar }, options);
2121
const taisho6 = Temporal.PlainDateTime.from({ era: "taisho", eraYear: 6, monthCode: "M03", day: 15, hour: 12, minute: 34, calendar }, options);
@@ -96,18 +96,16 @@ const tests = [
9696
[0, 7, 0, 10, "7mo 10d from Taisho 15 July 20 to Showa 1 December 30"],
9797
[0, 7, 0, 10, "7mo 10d from Taisho 15 July 20 to Showa 1 December 30"],
9898
],
99-
// From Meiji 5 (1872) to Taisho 6 (1917) - crossing era boundary
100-
// Note that contemporarily January 15 1872 would have been Meiji 4 in the
101-
// pre-1873 lunisolar calendar, but the spec-mandated behaviour is proleptic
99+
// From Meiji 7 (1874) to Taisho 6 (1917) - crossing era boundary
102100
[
103-
meiji5, taisho6,
104-
[-45, -2, 0, 0, "-45y -2mo backwards from Meiji 5 January to Taisho 6 March"],
105-
[0, -542, 0, 0, "-542mo backwards from Meiji 5 January to Taisho 6 March"],
101+
meiji7, taisho6,
102+
[-43, -2, 0, 0, "-43y -2mo backwards from Meiji 7 January to Taisho 6 March"],
103+
[0, -518, 0, 0, "-518mo backwards from Meiji 7 January to Taisho 6 March"],
106104
],
107105
[
108-
taisho6, meiji5,
109-
[45, 2, 0, 0, "45y 2mo from Meiji 5 January to Taisho 6 March"],
110-
[0, 542, 0, 0, "542mo from Meiji 5 January to Taisho 6 March"],
106+
taisho6, meiji7,
107+
[43, 2, 0, 0, "43y 2mo from Meiji 7 January to Taisho 6 March"],
108+
[0, 518, 0, 0, "518mo from Meiji 7 January to Taisho 6 March"],
111109
],
112110
// Within same year but different eras
113111
[
@@ -120,16 +118,16 @@ const tests = [
120118
[0, 2, 0, 21, "2mo 21d from Meiji 45 May 19 to Taisho 1 August 9"],
121119
[0, 2, 0, 21, "2mo 21d from Meiji 45 May 19 to Taisho 1 August 9"],
122120
],
123-
// Last pre-Meiji day to first day of Meiji era
121+
// Last pre-solar-calendar CE day to first solar-calendar day of Meiji era
124122
[
125-
ce1868, meiji1,
126-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
127-
[0, 0, 0, -1, "backwards from day before Meiji era to first day"],
123+
ce1872, meiji6,
124+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
125+
[0, 0, 0, -1, "backwards from day before solar Meiji era to first day"],
128126
],
129127
[
130-
meiji1, ce1868,
131-
[0, 0, 0, 1, "from day before Meiji era to first day"],
132-
[0, 0, 0, 1, "from day before Meiji era to first day"],
128+
meiji6, ce1872,
129+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
130+
[0, 0, 0, 1, "from day before solar Meiji era to first day"],
133131
],
134132
// CE-BCE boundary
135133
[

0 commit comments

Comments
 (0)