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
|
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);
|
$start = substr($datum, 0, 4);
|
||||||
$month = substr($datum, 5, 2);
|
$month = substr($datum, 5, 2);
|
||||||
$day = substr($datum, 8, 2);
|
if (intval($month) < 13) {
|
||||||
return [$start, $start, $month, $day, "+", ""];
|
$day = substr($datum, 8, 2);
|
||||||
|
return [$start, $start, $month, $day, "+", ""];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unset($start, $month);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// German MM.JJJJ
|
// German MM.JJJJ
|
||||||
if (preg_match("/^[0-9][0-9]\.[0-9][0-9][0-9][0-9]$/", $datum)) { // German Y-m
|
if (preg_match("/^[0-9][0-9]\.[0-9][0-9][0-9][0-9]$/", $datum)) { // German Y-m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user