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

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

Issue 10532068: Revert "Remove deprecated classes and functions in Date." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « corelib/src/corelib_sources.gypi ('k') | corelib/src/time_zone.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 30 matching lines...) Expand all
41 Date(int year, 41 Date(int year,
42 [int month, 42 [int month,
43 int day, 43 int day,
44 int hours, 44 int hours,
45 int minutes, 45 int minutes,
46 int seconds, 46 int seconds,
47 int milliseconds, 47 int milliseconds,
48 bool isUtc]); 48 bool isUtc]);
49 49
50 /** 50 /**
51 * Constructs a [Date] instance based on the individual parts.
52 * [timeZone] may not be [:null:].
53 *
54 * *DEPRECATED*
55 */
56 Date.withTimeZone(int year,
57 int month,
58 int day,
59 int hours,
60 int minutes,
61 int seconds,
62 int milliseconds,
63 TimeZone timeZone);
64
65 /**
51 * Constructs a new [Date] instance with current date time value in the 66 * Constructs a new [Date] instance with current date time value in the
52 * local time zone. 67 * local time zone.
53 */ 68 */
54 Date.now(); 69 Date.now();
55 70
56 /** 71 /**
57 * Constructs a new [Date] instance based on [formattedString]. 72 * Constructs a new [Date] instance based on [formattedString].
58 */ 73 */
59 Date.fromString(String formattedString); 74 Date.fromString(String formattedString);
60 75
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 Date toLocal(); 122 Date toLocal();
108 123
109 /** 124 /**
110 * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise, 125 * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise,
111 * this method is equivalent to 126 * this method is equivalent to
112 * [:new Date.fromEpoch(this.value, isUtc: true):]. 127 * [:new Date.fromEpoch(this.value, isUtc: true):].
113 */ 128 */
114 Date toUtc(); 129 Date toUtc();
115 130
116 /** 131 /**
132 * Returns a new [Date] in the given [targetTimeZone] time zone. The
133 * [value] of the new instance is equal to [:this.value:].
134 *
135 * This call is equivalent to
136 * [:new Date.fromEpoch(this.value, targetTimeZone):].
137 *
138 * *DEPRECATED*
139 */
140 Date changeTimeZone(TimeZone targetTimeZone);
141
142 /**
117 * Returns the abbreviated time-zone name. 143 * Returns the abbreviated time-zone name.
118 * 144 *
119 * Examples: [:"CET":] or [:"CEST":]. 145 * Examples: [:"CET":] or [:"CEST":].
120 */ 146 */
121 String get timeZoneName(); 147 String get timeZoneName();
122 148
123 /** 149 /**
124 * The time-zone offset is the difference between local time and UTC. That is, 150 * The time-zone offset is the difference between local time and UTC. That is,
125 * the offset is positive for time zones west of UTC. 151 * the offset is positive for time zones west of UTC.
126 * 152 *
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 /** 222 /**
197 * Returns a new [Date] with the [duration] subtracted from this instance. 223 * Returns a new [Date] with the [duration] subtracted from this instance.
198 */ 224 */
199 Date subtract(Duration duration); 225 Date subtract(Duration duration);
200 226
201 /** 227 /**
202 * Returns a [Duration] with the difference of [:this:] and [other]. 228 * Returns a [Duration] with the difference of [:this:] and [other].
203 */ 229 */
204 Duration difference(Date other); 230 Duration difference(Date other);
205 } 231 }
OLDNEW
« no previous file with comments | « corelib/src/corelib_sources.gypi ('k') | corelib/src/time_zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698