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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 /** | 106 /** |
107 * Returns a new [Date] in the given [targetTimeZone] time zone. The | 107 * Returns a new [Date] in the given [targetTimeZone] time zone. The |
108 * [value] of the new instance is equal to [:this.value:]. | 108 * [value] of the new instance is equal to [:this.value:]. |
109 * | 109 * |
110 * This call is equivalent to | 110 * This call is equivalent to |
111 * [:new Date.fromEpoch(this.value, targetTimeZone):]. | 111 * [:new Date.fromEpoch(this.value, targetTimeZone):]. |
112 */ | 112 */ |
113 Date changeTimeZone(TimeZone targetTimeZone); | 113 Date changeTimeZone(TimeZone targetTimeZone); |
114 | 114 |
115 /** | 115 /** |
116 * Returns the abbreviated time-zone name. | |
117 * | |
118 * Examples: [:"CET":] or [:"CEST":]. | |
119 */ | |
120 String get timeZoneName(); | |
121 | |
122 /** | |
123 * The time-zone offset is the difference between local time and UTC. That is, | |
124 * the offset is positive for time zones west of UTC. | |
125 * | |
126 * Note, that JavaScript, Python and C return the difference between UTC and | |
127 * local time. Java, C# and Ruby return the difference between local time and | |
128 * UTC. | |
129 */ | |
130 Duration get timeZoneOffset(); | |
Sean Eagan
2012/05/17 13:24:39
Did you consider adding an 'isDayLightSavingsTime'
| |
131 | |
132 /** | |
116 * Returns the year. | 133 * Returns the year. |
117 */ | 134 */ |
118 int get year(); | 135 int get year(); |
119 | 136 |
120 /** | 137 /** |
121 * Returns the month in the year [1..12]. | 138 * Returns the month in the year [1..12]. |
122 */ | 139 */ |
123 int get month(); | 140 int get month(); |
124 | 141 |
125 /** | 142 /** |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 /** | 206 /** |
190 * Returns a new [Date] with the [duration] subtracted from this instance. | 207 * Returns a new [Date] with the [duration] subtracted from this instance. |
191 */ | 208 */ |
192 Date subtract(Duration duration); | 209 Date subtract(Duration duration); |
193 | 210 |
194 /** | 211 /** |
195 * Returns a [Duration] with the difference of [:this:] and [other]. | 212 * Returns a [Duration] with the difference of [:this:] and [other]. |
196 */ | 213 */ |
197 Duration difference(Date other); | 214 Duration difference(Date other); |
198 } | 215 } |
OLD | NEW |