From ad89e94d67377baf93f4971326e0ea38045b016c Mon Sep 17 00:00:00 2001 From: "floitsch@google.com" Date: Thu, 6 Oct 2011 15:04:55 +0000 Subject: [PATCH] Fix bad merge. Unbreaks build. TBR=ngeoffray R=ngeoffray@google.com BUG= TEST= Review URL: https://chromereviews.googleplex.com/3542013 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@128 260f80e4-7a28-3924-810f-c04153c831b5 --- compiler/lib/implementation/date_implementation.dart | 5 +++-- runtime/lib/date.dart | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/compiler/lib/implementation/date_implementation.dart b/compiler/lib/implementation/date_implementation.dart index 4702236e533..6238a5a6029 100644 --- a/compiler/lib/implementation/date_implementation.dart +++ b/compiler/lib/implementation/date_implementation.dart @@ -95,9 +95,10 @@ class DateImplementation implements Date { int msSince1970 = this.difference(unixTimeStart).inMilliseconds; // Adjust the milliseconds to avoid problems with summer-time. if (hours < 2) { - msSince1970 += 2 * Duration.MS_PER_HOUR; + msSince1970 += 2 * Duration.MILLISECONDS_PER_HOUR; } - int daysSince1970 = (msSince1970 / Duration.MS_PER_DAY).floor().toInt(); + int daysSince1970 = + (msSince1970 / Duration.MILLISECONDS_PER_DAY).floor().toInt(); // 1970-1-1 was a Thursday. return ((daysSince1970 + Date.THU) % Date.DAYS_IN_WEEK); } diff --git a/runtime/lib/date.dart b/runtime/lib/date.dart index 0227a1e3975..edac8cb2532 100644 --- a/runtime/lib/date.dart +++ b/runtime/lib/date.dart @@ -175,15 +175,15 @@ class DateImplementation implements Date { int msSince1970 = this.difference(unixTimeStart).inMilliseconds; // Adjust the milliseconds to avoid problems with summer-time. if (hours < 2) { - msSince1970 += 2 * Duration.MS_PER_HOUR; + msSince1970 += 2 * Duration.MILLISECONDS_PER_HOUR; } // Compute the floor of msSince1970 / Duration.MS_PER_DAY. int daysSince1970; if (msSince1970 >= 0) { - daysSince1970 = msSince1970 ~/ Duration.MS_PER_DAY; + daysSince1970 = msSince1970 ~/ Duration.MILLISECONDS_PER_DAY; } else { - daysSince1970 = - (msSince1970 - Duration.MS_PER_DAY + 1) ~/ Duration.MS_PER_DAY; + daysSince1970 = (msSince1970 - Duration.MILLISECONDS_PER_DAY + 1) ~/ + Duration.MILLISECONDS_PER_DAY; } // 1970-1-1 was a Thursday. return ((daysSince1970 + Date.THU) % Date.DAYS_IN_WEEK);