Prevent ambigious splitting of [0-9]{4}-[0-9]{2}
This commit is contained in:
		| @@ -609,6 +609,12 @@ final class NodaTimeSplitter { | ||||
|  | ||||
|             // Assume the end is a month | ||||
|             if (intval($month) < 12) { | ||||
|                 // If the year is smaller than the second number, do not split, as either month | ||||
|                 // or year may be meant | ||||
|                 // Example: 1903-04 | ||||
|                 if (substr($datum, 2, 2) < 12) { | ||||
|                     return false; | ||||
|                 } | ||||
|                 return new NodaSplitTime($year, $year, $month); | ||||
|             } | ||||
|             else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user