Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // Dart core library. | 4 // Dart core library. |
| 5 | 5 |
| 6 // VM implementation of DateImplementation. | 6 // VM implementation of DateImplementation. |
| 7 patch class DateImplementation { | 7 patch class DateImplementation { |
| 8 /* patch */ DateImplementation(int year, | 8 /* patch */ DateImplementation(int year, |
| 9 [int month = 1, | 9 {int month: 1, |
|
Lasse Reichstein Nielsen
2012/10/09 12:35:00
And again.
regis
2012/10/11 01:33:56
Done.
regis
2012/10/11 01:33:56
Done.
| |
| 10 int day = 1, | 10 int day: 1, |
| 11 int hour = 0, | 11 int hour: 0, |
| 12 int minute = 0, | 12 int minute: 0, |
| 13 int second = 0, | 13 int second: 0, |
| 14 int millisecond = 0, | 14 int millisecond: 0, |
| 15 bool isUtc = false]) | 15 bool isUtc: false}) |
| 16 : this.isUtc = isUtc, | 16 : this.isUtc = isUtc, |
| 17 this.millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch( | 17 this.millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch( |
| 18 year, month, day, hour, minute, second, millisecond, isUtc) { | 18 year, month, day, hour, minute, second, millisecond, isUtc) { |
| 19 if (millisecondsSinceEpoch === null) throw new ArgumentError(); | 19 if (millisecondsSinceEpoch === null) throw new ArgumentError(); |
| 20 if (isUtc === null) throw new ArgumentError(); | 20 if (isUtc === null) throw new ArgumentError(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 /* patch */ DateImplementation.now() | 23 /* patch */ DateImplementation.now() |
| 24 : isUtc = false, | 24 : isUtc = false, |
| 25 millisecondsSinceEpoch = _getCurrentMs() { | 25 millisecondsSinceEpoch = _getCurrentMs() { |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 | 315 |
| 316 static String _timeZoneNameForClampedSeconds(int secondsSinceEpoch) | 316 static String _timeZoneNameForClampedSeconds(int secondsSinceEpoch) |
| 317 native "DateNatives_timeZoneName"; | 317 native "DateNatives_timeZoneName"; |
| 318 | 318 |
| 319 static int _timeZoneOffsetInSecondsForClampedSeconds(int secondsSinceEpoch) | 319 static int _timeZoneOffsetInSecondsForClampedSeconds(int secondsSinceEpoch) |
| 320 native "DateNatives_timeZoneOffsetInSeconds"; | 320 native "DateNatives_timeZoneOffsetInSeconds"; |
| 321 | 321 |
| 322 static int _localTimeZoneAdjustmentInSeconds() | 322 static int _localTimeZoneAdjustmentInSeconds() |
| 323 native "DateNatives_localTimeZoneAdjustmentInSeconds"; | 323 native "DateNatives_localTimeZoneAdjustmentInSeconds"; |
| 324 } | 324 } |
| OLD | NEW |