Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: third_party/pkg/js/lib/src/wrapping/js/date_to_datetime_adapter.dart

Issue 56153005: Remove SendPortSync and ReceivePortSync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove third_party/pkg/js and dom/Serialization.dart Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/js/lib/src/wrapping/js/date_to_datetime_adapter.dart
diff --git a/third_party/pkg/js/lib/src/wrapping/js/date_to_datetime_adapter.dart b/third_party/pkg/js/lib/src/wrapping/js/date_to_datetime_adapter.dart
deleted file mode 100644
index c7165f073d48618bdc842787d40331376dfb90ee..0000000000000000000000000000000000000000
--- a/third_party/pkg/js/lib/src/wrapping/js/date_to_datetime_adapter.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of js.wrapping;
-
-/// Adapter to handle a js date as a dart [DateTime].
-class JsDateToDateTimeAdapter extends TypedProxy implements DateTime {
-
- /// Like [JsDateToDateTimeAdapter.fromProxy] but with `null` handling for
- /// [proxy].
- static JsDateToDateTimeAdapter cast(Proxy proxy) =>
- mapNotNull(proxy, (proxy) =>
- new JsDateToDateTimeAdapter.fromProxy(proxy));
-
- /// Create a new adapter from a dart [dateTime].
- JsDateToDateTimeAdapter(DateTime dateTime) :
- super(context.Date, [dateTime.millisecondsSinceEpoch]);
-
- /// Create a new adapter from a [proxy] of a Js Date object.
- JsDateToDateTimeAdapter.fromProxy(Proxy proxy) : super.fromProxy(proxy);
-
- // from Comparable
- @override int compareTo(DateTime other) => _asDateTime().compareTo(other);
-
- // from Date
- @override bool operator ==(DateTime other) => _asDateTime() == other;
- @override bool isBefore(DateTime other) => _asDateTime().isBefore(other);
- @override bool isAfter(DateTime other) => _asDateTime().isAfter(other);
- @override bool isAtSameMomentAs(DateTime other) =>
- _asDateTime().isAtSameMomentAs(other);
- @override DateTime toLocal() => _asDateTime().toLocal();
- @override DateTime toUtc() => _asDateTime().toUtc();
- @override String get timeZoneName => _asDateTime().timeZoneName;
- @override Duration get timeZoneOffset => _asDateTime().timeZoneOffset;
- @override int get year => _asDateTime().year;
- @override int get month => _asDateTime().month;
- @override int get day => _asDateTime().day;
- @override int get hour => _asDateTime().hour;
- @override int get minute => _asDateTime().minute;
- @override int get second => _asDateTime().second;
- @override int get millisecond => _asDateTime().millisecond;
- @override int get weekday => _asDateTime().weekday;
- @override int get millisecondsSinceEpoch =>
- _asDateTime().millisecondsSinceEpoch;
- @override bool get isUtc => _asDateTime().isUtc;
- @override String toString() => _asDateTime().toString();
- @override DateTime add(Duration duration) => _asDateTime().add(duration);
- @override DateTime subtract(Duration duration) =>
- _asDateTime().subtract(duration);
- @override Duration difference(DateTime other) =>
- _asDateTime().difference(other);
-
- DateTime _asDateTime() =>
- new DateTime.fromMillisecondsSinceEpoch($unsafe.getTime());
-}

Powered by Google App Engine
This is Rietveld 408576698