Forráskód Böngészése

DateTools.makeUtc is not completely implemented yet

Simon Krajewski 12 éve
szülő
commit
650ad26baf
2 módosított fájl, 6 hozzáadás és 3 törlés
  1. 3 2
      std/DateTools.hx
  2. 3 1
      tests/unit/unitstd/DateTools.unit.hx

+ 3 - 2
std/DateTools.hx

@@ -200,6 +200,7 @@ class DateTools {
 		return o.ms + 1000.0 * (o.seconds + 60.0 * (o.minutes + 60.0 * (o.hours + 24.0 * o.days)));
 	}
 	
+	#if (js || flash || php || cpp)
 	/**
 		Retrieve Unix timestamp value from Date components. Takes same argument sequence as the Date constructor.
 	**/
@@ -209,11 +210,11 @@ class DateTools {
 		#elseif php
 		   return untyped __call__("gmmktime", hour, min, sec, month + 1, day, year) * 1000;
 		#elseif cpp
-		  return untyped __global__.__hxcpp_utc_date(year,month,day,hour,min,sec)*1000.0 ;  
+		  return untyped __global__.__hxcpp_utc_date(year,month,day,hour,min,sec)*1000.0 ;
 		#else
 			//TODO
 		   return 0.;
 		#end
 	}
-
+	#end
 }

+ 3 - 1
tests/unit/unitstd/DateTools.unit.hx

@@ -8,4 +8,6 @@ var d2 = DateTools.delta(d, diff);
 d2.toString() == "2012-02-17 01:03:02";
 
 //UTC based timestamp generation
-DateTools.makeUtc(1982, 10, 10, 14, 2, 20) == 405784940000.;
+#if (js || flash || php || cpp)
+DateTools.makeUtc(1982, 10, 10, 14, 2, 20) == 405784940000.;
+#end