Explorar o código

Fix parse, year < 100

Pascal Peridont %!s(int64=17) %!d(string=hai) anos
pai
achega
a02b60114e
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      std/mtwin/DateFormat.hx

+ 5 - 0
std/mtwin/DateFormat.hx

@@ -90,6 +90,11 @@ class DateFormat {
 			return null;
 		}
 
+		if( y < 50 )
+			y += 2000;
+		else if( y < 100 )
+			y += 1900;
+
 		if( REG_HOUR.match(str) ){
 			h = Std.parseInt(REG_HOUR.matched(1));
 			i = Std.parseInt(REG_HOUR.matched(2));