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

Unified Diff: runtime/lib/date_patch.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months 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: runtime/lib/date_patch.dart
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 349245e7491c074d49280756c487e29e43b3f1a3..8eb95f56854a018074b150e865e67caba54111c0 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -75,8 +75,8 @@ patch class _DateImpl {
int daysSince1970 =
_flooredDivision(_localDateInUtcMs, Duration.MILLISECONDS_PER_DAY);
// 1970-1-1 was a Thursday.
- return ((daysSince1970 + Date.THU - Date.MON) % Date.DAYS_IN_WEEK) +
- Date.MON;
+ return ((daysSince1970 + DateTime.THU - DateTime.MON) % DateTime.DAYS_IN_WEEK) +
+ DateTime.MON;
}
@@ -140,10 +140,10 @@ patch class _DateImpl {
* as [this].
*
* Say [:t:] is the result of this function, then
- * * [:this.year == new Date.fromMillisecondsSinceEpoch(t, true).year:],
- * * [:this.month == new Date.fromMillisecondsSinceEpoch(t, true).month:],
- * * [:this.day == new Date.fromMillisecondsSinceEpoch(t, true).day:],
- * * [:this.hour == new Date.fromMillisecondsSinceEpoch(t, true).hour:],
+ * * [:this.year == new DateTime.fromMillisecondsSinceEpoch(t, true).year:],
+ * * [:this.month == new DateTime.fromMillisecondsSinceEpoch(t, true).month:],
+ * * [:this.day == new DateTime.fromMillisecondsSinceEpoch(t, true).day:],
+ * * [:this.hour == new DateTime.fromMillisecondsSinceEpoch(t, true).hour:],
* * ...
*
* Daylight savings is computed as if the date was computed in [1970..2037].

Powered by Google App Engine
This is Rietveld 408576698