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 factory DateImplementation { | 10 interface Date extends Comparable default DateImplementation { |
11 // Weekday constants that are returned by [weekday] method: | 11 // Weekday constants that are returned by [weekday] method: |
12 static final int MON = 0; | 12 static final int MON = 0; |
13 static final int TUE = 1; | 13 static final int TUE = 1; |
14 static final int WED = 2; | 14 static final int WED = 2; |
15 static final int THU = 3; | 15 static final int THU = 3; |
16 static final int FRI = 4; | 16 static final int FRI = 4; |
17 static final int SAT = 5; | 17 static final int SAT = 5; |
18 static final int SUN = 6; | 18 static final int SUN = 6; |
19 static final int DAYS_IN_WEEK = 7; | 19 static final int DAYS_IN_WEEK = 7; |
20 | 20 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 /** | 166 /** |
167 * Returns a new [Date] with the [duration] subtracted from this instance. | 167 * Returns a new [Date] with the [duration] subtracted from this instance. |
168 */ | 168 */ |
169 Date subtract(Duration duration); | 169 Date subtract(Duration duration); |
170 | 170 |
171 /** | 171 /** |
172 * Returns a [Duration] with the difference of [:this:] and [other]. | 172 * Returns a [Duration] with the difference of [:this:] and [other]. |
173 */ | 173 */ |
174 Duration difference(Date other); | 174 Duration difference(Date other); |
175 } | 175 } |
OLD | NEW |