Browse Source

[js] simplify Date.fromTime

Dan Korostelev 9 years ago
parent
commit
141418a7eb
1 changed files with 1 additions and 3 deletions
  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 {