Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 4 |
| 5 // Dart core library. | 5 // Dart core library. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Date is the public interface to a point in time. | 8 * Date is the public interface to a point in time. |
| 9 */ | 9 */ |
| 10 interface Date extends Comparable, Hashable default DateImplementation { | 10 interface Date extends Comparable, Hashable default DateImplementation { |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 static final int AUG = 8; | 29 static final int AUG = 8; |
| 30 static final int SEP = 9; | 30 static final int SEP = 9; |
| 31 static final int OCT = 10; | 31 static final int OCT = 10; |
| 32 static final int NOV = 11; | 32 static final int NOV = 11; |
| 33 static final int DEC = 12; | 33 static final int DEC = 12; |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Constructs a [Date] instance based on the individual parts, in the | 36 * Constructs a [Date] instance based on the individual parts, in the |
| 37 * local time-zone. | 37 * local time-zone. |
| 38 */ | 38 */ |
| 39 // TODO(floitsch): the spec allows default values in interfaces, but our | |
| 40 // our tools don't yet. Eventually we want to have default values here. | |
|
ngeoffray
2012/05/15 12:17:35
our our -> our
floitsch
2012/05/15 12:34:22
Done.
| |
| 39 Date(int year, | 41 Date(int year, |
| 40 int month, | 42 [int month, |
|
sorinmocanu
2012/05/15 12:21:59
Where will you document the possible combinations
floitsch
2012/05/15 12:34:22
Each argument has a default value. 1 for month and
| |
| 41 int day, | 43 int day, |
| 42 int hours, | 44 int hours, |
| 43 int minutes, | 45 int minutes, |
| 44 int seconds, | 46 int seconds, |
| 45 int milliseconds); | 47 int milliseconds]); |
| 46 | 48 |
| 47 /** | 49 /** |
| 48 * Constructs a [Date] instance based on the individual parts. | 50 * Constructs a [Date] instance based on the individual parts. |
| 49 * [timeZone] may not be [:null:]. | 51 * [timeZone] may not be [:null:]. |
| 50 */ | 52 */ |
| 51 Date.withTimeZone(int year, | 53 Date.withTimeZone(int year, |
| 52 int month, | 54 int month, |
| 53 int day, | 55 int day, |
| 54 int hours, | 56 int hours, |
| 55 int minutes, | 57 int minutes, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 /** | 168 /** |
| 167 * Returns a new [Date] with the [duration] subtracted from this instance. | 169 * Returns a new [Date] with the [duration] subtracted from this instance. |
| 168 */ | 170 */ |
| 169 Date subtract(Duration duration); | 171 Date subtract(Duration duration); |
| 170 | 172 |
| 171 /** | 173 /** |
| 172 * Returns a [Duration] with the difference of [:this:] and [other]. | 174 * Returns a [Duration] with the difference of [:this:] and [other]. |
| 173 */ | 175 */ |
| 174 Duration difference(Date other); | 176 Duration difference(Date other); |
| 175 } | 177 } |
| OLD | NEW |