Przeglądaj źródła

fix implementation

Nicolas Cannasse 17 lat temu
rodzic
commit
dc266fd0bc
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      std/DateTools.hx

+ 6 - 6
std/DateTools.hx

@@ -184,14 +184,14 @@ class DateTools {
 		Separate a date-time into several components
 	**/
 	public static function parse( t : Float ) {
-		var s = Std.int(t / 1000);
-		var m = Std.int(s / 60);
-		var h = Std.int(m / 60);
+		var s = t / 1000;
+		var m = s / 60;
+		var h = m / 60;
 		return {
 			ms : t % 1000,
-			seconds : s % 60,
-			minutes : m % 60,
-			hours : h % 24,
+			seconds : Std.int(s % 60),
+			minutes : Std.int(m % 60),
+			hours : Std.int(h % 24),
 			days : Std.int(h / 24),
 		};
 	}