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

Unified Diff: runtime/lib/date_patch.dart

Issue 13841005: Rename DateTime constants to full names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | samples/swarm/swarm_ui_lib/util/DateUtils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/date_patch.dart
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index b83e96bb77759de62a6ffa9efeac9ff1de100d22..c1336c47badd131f9f0015054d49f5ecc7719dcb 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -75,8 +75,9 @@ patch class DateTime {
int daysSince1970 =
_flooredDivision(_localDateInUtcMs, Duration.MILLISECONDS_PER_DAY);
// 1970-1-1 was a Thursday.
- return ((daysSince1970 + DateTime.THU - DateTime.MON) % DateTime.DAYS_IN_WEEK) +
- DateTime.MON;
+ return ((daysSince1970 + DateTime.THURSDAY - DateTime.MONDAY)
+ % DateTime.DAYS_IN_WEEK) +
+ DateTime.MONDAY;
}
« no previous file with comments | « no previous file | samples/swarm/swarm_ui_lib/util/DateUtils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698