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

Side by Side Diff: pkg/intl/date_format.dart

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 4 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 | « pkg/fixnum/test/int_64_vm_test.dart ('k') | pkg/intl/lib/date_format_helpers.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * DateFormat is for formatting and parsing dates in a locale-sensitive 6 * DateFormat is for formatting and parsing dates in a locale-sensitive
7 * manner. 7 * manner.
8 * It allows the user to choose from a set of standard date time formats as well 8 * It allows the user to choose from a set of standard date time formats as well
9 * as specify a customized pattern under certain locales. Date elements that 9 * as specify a customized pattern under certain locales. Date elements that
10 * vary across locales include month name, week name, field order, etc. 10 * vary across locales include month name, week name, field order, etc.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 * century. Any other numeric string, such as a one digit string, a three or 149 * century. Any other numeric string, such as a one digit string, a three or
150 * more digit string will be interpreted as its face value. 150 * more digit string will be interpreted as its face value.
151 * 151 *
152 * If the year pattern does not have exactly two 'y' characters, the year is 152 * If the year pattern does not have exactly two 'y' characters, the year is
153 * interpreted literally, regardless of the number of digits. So using the 153 * interpreted literally, regardless of the number of digits. So using the
154 * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. 154 * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
155 */ 155 */
156 156
157 #library('date_format'); 157 #library('date_format');
158 158
159 #import('dart:math');
160
159 #import('intl.dart'); 161 #import('intl.dart');
160 #import('date_time_patterns.dart'); 162 #import('date_time_patterns.dart');
161 #import('date_symbols.dart'); 163 #import('date_symbols.dart');
162 #import('date_symbol_data.dart'); 164 #import('date_symbol_data.dart');
163 165
164 #source('lib/date_format_field.dart'); 166 #source('lib/date_format_field.dart');
165 #source('lib/date_format_helpers.dart'); 167 #source('lib/date_format_helpers.dart');
166 168
167 class DateFormat { 169 class DateFormat {
168 170
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 /** Polyfill for missing library function. */ 591 /** Polyfill for missing library function. */
590 List _reverse(List list) { 592 List _reverse(List list) {
591 // TODO(alanknight): Use standardized list reverse when implemented. 593 // TODO(alanknight): Use standardized list reverse when implemented.
592 // See Issue 2804. 594 // See Issue 2804.
593 var result = new List(); 595 var result = new List();
594 for (var i = list.length-1; i >= 0; i--) { 596 for (var i = list.length-1; i >= 0; i--) {
595 result.addLast(list[i]); 597 result.addLast(list[i]);
596 } 598 }
597 return result; 599 return result;
598 } 600 }
599 } 601 }
OLDNEW
« no previous file with comments | « pkg/fixnum/test/int_64_vm_test.dart ('k') | pkg/intl/lib/date_format_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698