Only allow splitting by international format if month < 13
This commit is contained in:
parent
48f3bd2c3f
commit
de7968fbbd
|
@ -528,8 +528,13 @@ final class NodaTimeSplitter {
|
|||
if (preg_match("/^[0-9][0-9][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);
|
||||
$day = substr($datum, 8, 2);
|
||||
return [$start, $start, $month, $day, "+", ""];
|
||||
if (intval($month) < 13) {
|
||||
$day = substr($datum, 8, 2);
|
||||
return [$start, $start, $month, $day, "+", ""];
|
||||
}
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user