Continue refactoring tests for time splitter to run provider-based
This commit is contained in:
parent
dbfa0df17f
commit
d9d9f7fcdc
@ -752,8 +752,15 @@ final class NodaTimeSplitter {
|
||||
return new NodaSplitTime($year, $year);
|
||||
}
|
||||
|
||||
if (\preg_match("/^[0-9]{4}$/", \strtr($inpDateWoSpaces, ['-0' => '', '0-' => '', 'o' => '0']))) { // German Y-m
|
||||
$year = \strtr($inpDateWoSpaces, ['-0' => '', '0-' => '', 'o' => '0']);
|
||||
if (str_starts_with($inpDateWoSpaces, '0-') || str_ends_with($inpDateWoSpaces, '-0') && \preg_match("/^[0-9]{4}$/", \strtr($inpDateWoSpaces, ['-0' => '', '0-' => '']))) {
|
||||
$year = \strtr($inpDateWoSpaces, ['-0' => '', '0-' => '']);
|
||||
if (strlen($year) === 4) {
|
||||
return new NodaSplitTime($year, $year);
|
||||
}
|
||||
}
|
||||
|
||||
if (\preg_match("/^[0-9]{4}$/", \strtr($inpDateWoSpaces, ['o' => '0']))) { // German Y-m
|
||||
$year = \strtr($inpDateWoSpaces, ['o' => '0']);
|
||||
return new NodaSplitTime($year, $year);
|
||||
}
|
||||
|
||||
@ -870,7 +877,7 @@ final class NodaTimeSplitter {
|
||||
$output->counting_time_indicator, NodaTimeBeforeAfterIndicator::until, '?', $output->end_date);
|
||||
}
|
||||
}
|
||||
if (str_ends_with($datum, '-as évekig') || str_ends_with($datum, '-es évekig')) {
|
||||
if (str_ends_with($datum, ' as évekig') || str_ends_with($datum, ' es évekig') || str_ends_with($datum, '-as évekig') || str_ends_with($datum, '-es évekig')) {
|
||||
if ($output = self::attempt_splitting(\substr($datum, 0, -2))) {
|
||||
return new NodaSplitTime('?', $output->end_year, $output->counting_time_month, $output->counting_time_day,
|
||||
$output->counting_time_indicator, NodaTimeBeforeAfterIndicator::until, '?', $output->end_date);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user