Allow parsing of "1910-1925."
This commit is contained in:
parent
9f39437c6e
commit
7bc5bdf335
@ -463,9 +463,11 @@ final class NodaTimeSplitter {
|
||||
|
||||
$datum = self::clean_input($datum);
|
||||
|
||||
if (preg_match("/^[0-9][0-9][0-9][0-9](\-|\/)[0-9][0-9][0-9][0-9]$/", $datum)) {
|
||||
if (preg_match("/^[0-9][0-9][0-9][0-9](\-|\/)[0-9][0-9][0-9][0-9]$/", $datum)
|
||||
|| preg_match("/^[0-9][0-9][0-9][0-9](\-|\/)[0-9][0-9][0-9][0-9]\.$/", $datum)
|
||||
) {
|
||||
$start = substr($datum, 0, 4);
|
||||
$end = substr($datum, -4);
|
||||
$end = substr($datum, 5, 4);
|
||||
return [$start, $end, "00", "00", "+", ""];
|
||||
}
|
||||
if (preg_match("/^[0-9][0-9]\.[0-9]\.[0-9][0-9][0-9][0-9]$/", $datum)) { // German T.MM.JJJJ
|
||||
|
Loading…
Reference in New Issue
Block a user