Enable parsing of months: 2020-01
This commit is contained in:
@ -536,6 +536,18 @@ final class NodaTimeSplitter {
|
||||
unset($start, $month);
|
||||
}
|
||||
}
|
||||
// Intl': 2020-12
|
||||
if (preg_match("/^[0-9][0-9][0-9][0-9]\-[0-9][0-9]$/", $datum)) { // German Y-m
|
||||
$start = substr($datum, 0, 4);
|
||||
$month = substr($datum, 5, 2);
|
||||
if (intval($month) < 13) {
|
||||
return [$start, $start, $month, "00", "+", ""];
|
||||
}
|
||||
else {
|
||||
unset($start, $month);
|
||||
}
|
||||
}
|
||||
|
||||
// German MM.JJJJ
|
||||
if (preg_match("/^[0-9][0-9]\.[0-9][0-9][0-9][0-9]$/", $datum)) { // German Y-m
|
||||
$start = substr($datum, 3, 4);
|
||||
|
Reference in New Issue
Block a user