Chromium Code Reviews| Index: runtime/lib/date.dart |
| diff --git a/runtime/lib/date.dart b/runtime/lib/date.dart |
| index dc69834bd167e91e47acffbcd361336fc2471927..bdfcca9c24f963645bd915e97125925681a4d6f2 100644 |
| --- a/runtime/lib/date.dart |
| +++ b/runtime/lib/date.dart |
| @@ -18,12 +18,12 @@ class TimeZoneImplementation implements TimeZone { |
| // JavaScript implementation of DateImplementation. |
| class DateImplementation implements Date { |
| factory DateImplementation(int years, |
| - int month, |
| - int day, |
| - int hours, |
| - int minutes, |
| - int seconds, |
| - int milliseconds) { |
| + [int month = 1, |
| + int day = 1, |
| + int hours = 0, |
| + int minutes = 0, |
| + int seconds = 0, |
| + int milliseconds = 0]) { |
| return new DateImplementation.withTimeZone( |
| years, month, day, |
| hours, minutes, seconds, milliseconds, |
| @@ -112,8 +112,9 @@ class DateImplementation implements Date { |
| return value == other.value && timeZone == other.timeZone; |
| } |
| - int compareTo(Date other) => value.compareTo(other.value); |
| - int hashCode() => value; |
|
ngeoffray
2012/05/15 12:17:35
bad mergE?
floitsch
2012/05/15 12:34:22
Done.
|
| + int compareTo(Date other) { |
| + return value.compareTo(other.value); |
| + } |
| Date changeTimeZone(TimeZone targetTimeZone) { |
| if (targetTimeZone === null) { |
| @@ -209,7 +210,7 @@ class DateImplementation implements Date { |
| } |
| String threeDigits(int n) { |
| if (n >= 100) return "${n}"; |
| - if (n >= 10) return "0${n}"; |
|
ngeoffray
2012/05/15 12:17:35
ditto?
floitsch
2012/05/15 12:34:22
Done.
|
| + if (n > 10) return "0${n}"; |
| return "00${n}"; |
| } |
| String twoDigits(int n) { |