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

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

Issue 10541050: 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 /**
66 * Constructs a new [Date] instance with current date time value in the 51 * Constructs a new [Date] instance with current date time value in the
67 * local time zone. 52 * local time zone.
68 */ 53 */
69 Date.now(); 54 Date.now();
70 55
71 /** 56 /**
72 * Constructs a new [Date] instance based on [formattedString]. 57 * Constructs a new [Date] instance based on [formattedString].
73 */ 58 */
74 Date.fromString(String formattedString); 59 Date.fromString(String formattedString);
75 60
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 Date toLocal(); 107 Date toLocal();
123 108
124 /** 109 /**
125 * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise, 110 * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise,
126 * this method is equivalent to 111 * this method is equivalent to
127 * [:new Date.fromEpoch(this.value, isUtc: true):]. 112 * [:new Date.fromEpoch(this.value, isUtc: true):].
128 */ 113 */
129 Date toUtc(); 114 Date toUtc();
130 115
131 /** 116 /**
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 /**
143 * Returns the abbreviated time-zone name. 117 * Returns the abbreviated time-zone name.
144 * 118 *
145 * Examples: [:"CET":] or [:"CEST":]. 119 * Examples: [:"CET":] or [:"CEST":].
146 */ 120 */
147 String get timeZoneName(); 121 String get timeZoneName();
148 122
149 /** 123 /**
150 * The time-zone offset is the difference between local time and UTC. That is, 124 * The time-zone offset is the difference between local time and UTC. That is,
151 * the offset is positive for time zones west of UTC. 125 * the offset is positive for time zones west of UTC.
152 * 126 *
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 /** 196 /**
223 * Returns a new [Date] with the [duration] subtracted from this instance. 197 * Returns a new [Date] with the [duration] subtracted from this instance.
224 */ 198 */
225 Date subtract(Duration duration); 199 Date subtract(Duration duration);
226 200
227 /** 201 /**
228 * Returns a [Duration] with the difference of [:this:] and [other]. 202 * Returns a [Duration] with the difference of [:this:] and [other].
229 */ 203 */
230 Duration difference(Date other); 204 Duration difference(Date other);
231 } 205 }
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