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 * |
| 10 * It can represent time values that are at a distance of at most |
| 11 * 8,640,000,000,000,000ms (100,000,000 days) from epoch (1970-01-01 UTC). In |
| 12 * other words: [:value.abs() <= 8640000000000000:]. |
9 */ | 13 */ |
10 interface Date extends Comparable, Hashable default DateImplementation { | 14 interface Date extends Comparable, Hashable default DateImplementation { |
11 // Weekday constants that are returned by [weekday] method: | 15 // Weekday constants that are returned by [weekday] method: |
12 static final int MON = 0; | 16 static final int MON = 0; |
13 static final int TUE = 1; | 17 static final int TUE = 1; |
14 static final int WED = 2; | 18 static final int WED = 2; |
15 static final int THU = 3; | 19 static final int THU = 3; |
16 static final int FRI = 4; | 20 static final int FRI = 4; |
17 static final int SAT = 5; | 21 static final int SAT = 5; |
18 static final int SUN = 6; | 22 static final int SUN = 6; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 /** | 200 /** |
197 * Returns a new [Date] with the [duration] subtracted from this instance. | 201 * Returns a new [Date] with the [duration] subtracted from this instance. |
198 */ | 202 */ |
199 Date subtract(Duration duration); | 203 Date subtract(Duration duration); |
200 | 204 |
201 /** | 205 /** |
202 * Returns a [Duration] with the difference of [:this:] and [other]. | 206 * Returns a [Duration] with the difference of [:this:] and [other]. |
203 */ | 207 */ |
204 Duration difference(Date other); | 208 Duration difference(Date other); |
205 } | 209 } |
OLD | NEW |