소스 검색

Fix parse, year < 100

Pascal Peridont 17 년 전
부모
커밋
a02b60114e
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      std/mtwin/DateFormat.hx

+ 5 - 0
std/mtwin/DateFormat.hx

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