Split times in more cases (300-20 BC, 300-4000 CE)

This commit is contained in:
2025-04-08 15:16:25 +02:00
parent 00638152cf
commit 7a2856ffad
2 changed files with 70 additions and 2 deletions

View File

@ -174,6 +174,43 @@ final class NodaTimeSplitterTest extends TestCase {
end_date: '-0018-12-31'),
"18 v. Chr.",
],
"843-1100" => [
"843-1100",
new NodaSplitTime('0843', '1100',
start_date: '0843-01-01',
end_date: '1100-12-31'),
"843-1100",
],
"2-7 n. Chr." => [
"2-7 n. Chr.",
new NodaSplitTime('0002', '0007',
start_date: '0002-01-01',
end_date: '0007-12-31'),
"2-7 n. Chr.",
],
"0-280 n. Chr." => [
"0-280 n. Chr.",
new NodaSplitTime('0000', '0280',
start_date: '0000-01-01',
end_date: '0280-12-31'),
"0-280 n. Chr.",
],
"280-10 v. Chr." => [
"280-10 v. Chr.",
new NodaSplitTime('-280', '-10',
counting_time_indicator: NodaCountingTimeIndicator::bce,
start_date: '-0280-01-01',
end_date: '-0010-12-31'),
"280-10 v. Chr.",
],
"28-1 v. Chr." => [
"28-1 v. Chr.",
new NodaSplitTime('-28', '-1',
counting_time_indicator: NodaCountingTimeIndicator::bce,
start_date: '-0028-01-01',
end_date: '-0001-12-31'),
"28-1 v. Chr.",
],
];
}
@ -567,7 +604,6 @@ final class NodaTimeSplitterTest extends TestCase {
"1978. július7",
"1978. július 7 elött",
"Anfang September 1903",
"120-63 v. Chr.",
"0-25 n. Chr.", // Should not be splittable because 25 CE is too close to 0. 0 might actually be correct, not an artefact.
] as $entry) {
$output[$entry] = [$entry];