Explorar o código

[js] simplify Date.fromTime

Dan Korostelev %!s(int64=9) %!d(string=hai) anos
pai
achega
141418a7eb
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      std/js/_std/Date.hx

+ 1 - 3
std/js/_std/Date.hx

@@ -40,9 +40,7 @@
 	}
 
 	static inline function fromTime( t : Float ) : Date {
-		var d : Date = untyped __new__(Date);
-		untyped d["setTime"]( t );
-		return d;
+		return untyped __new__(Date, t);
 	}
 
 	static inline function fromString( s : String ) : Date {