Index: tools/dom/src/dart2js_Conversions.dart |
diff --git a/tools/dom/src/dart2js_Conversions.dart b/tools/dom/src/dart2js_Conversions.dart |
index 8b75d7176d4aa001c6e558061dc307e6b2a8878f..7e9ee41aaa11b51c96fcb5a961f021fb0fd2db69 100644 |
--- a/tools/dom/src/dart2js_Conversions.dart |
+++ b/tools/dom/src/dart2js_Conversions.dart |
@@ -11,6 +11,15 @@ |
part of html; |
+DateTime _convertNativeToDart_DateTime(date) { |
+ var millisSinceEpoch = JS('int', '#.getTime()', date); |
+ return new DateTime.fromMillisecondsSinceEpoch(millisSinceEpoch, isUtc: true); |
+} |
+ |
+_convertDartToNative_DateTime(DateTime date) { |
+ return JS('', 'new Date(#)', date.millisecondsSinceEpoch); |
+} |
+ |
WindowBase _convertNativeToDart_Window(win) { |
return _DOMWindowCrossFrame._createSafe(win); |
} |