Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: corelib/src/date.dart

Issue 10413031: Reapply "Add support for timezone offset and timezone name." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | frog/lib/date_implementation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
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
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 }
OLDNEW
« no previous file with comments | « no previous file | frog/lib/date_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698