Index: tools/dom/src/native_DOMImplementation.dart |
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart |
index 84d9af80bdc0582fc8c3e4f1c1ae9dd10b378fef..cd98baf128b56e9773769fd923b8b643330dcc8d 100644 |
--- a/tools/dom/src/native_DOMImplementation.dart |
+++ b/tools/dom/src/native_DOMImplementation.dart |
@@ -5,6 +5,11 @@ |
part of html; |
class _Utils { |
+ static double dateTimeToDouble(DateTime dateTime) => |
+ dateTime.millisecondsSinceEpoch.toDouble(); |
+ static DateTime doubleToDateTime(double dateTime) => |
+ new DateTime.fromMillisecondsSinceEpoch(dateTime.toInt()); |
+ |
static List convertToList(List list) { |
// FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it. |
final length = list.length; |