Browse Source

Let's really see how inconsistent Date is (see #4584)

Dan Korostelev 9 years ago
parent
commit
eca09499dc
1 changed files with 12 additions and 1 deletions
  1. 12 1
      tests/unit/src/unitstd/Date.unit.hx

+ 12 - 1
tests/unit/src/unitstd/Date.unit.hx

@@ -8,4 +8,15 @@ date.getMonth() == 10;
 date.getDate() == 10;
 date.getDay() == 3;
 //date.getTime() == 405781340000.;
-date.toString() == "1982-11-10 14:02:20";
+date.toString() == "1982-11-10 14:02:20";
+
+var date = Date.fromTime(date.getTime());
+date.getHours() == 14;
+date.getMinutes() == 2;
+date.getSeconds() == 20;
+date.getFullYear() == 1982;
+date.getMonth() == 10;
+date.getDate() == 10;
+date.getDay() == 3;
+//date.getTime() == 405781340000.;
+date.toString() == "1982-11-10 14:02:20";