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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user