| OLD | NEW |
| 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 part of intl; | 5 part of intl; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * DateFormat is for formatting and parsing dates in a locale-sensitive | 8 * DateFormat is for formatting and parsing dates in a locale-sensitive |
| 9 * manner. | 9 * manner. |
| 10 * It allows the user to choose from a set of standard date time formats as well | 10 * It allows the user to choose from a set of standard date time formats as well |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * Return the locale code in which we operate, e.g. 'en_US' or 'pt'. | 246 * Return the locale code in which we operate, e.g. 'en_US' or 'pt'. |
| 247 */ | 247 */ |
| 248 String get locale => _locale; | 248 String get locale => _locale; |
| 249 | 249 |
| 250 /** | 250 /** |
| 251 * Returns a list of all locales for which we have date formatting | 251 * Returns a list of all locales for which we have date formatting |
| 252 * information. | 252 * information. |
| 253 */ | 253 */ |
| 254 static List<String> allLocalesWithSymbols() => dateTimeSymbols.keys; | 254 static List<String> allLocalesWithSymbols() => dateTimeSymbols.keys.toList(); |
| 255 | 255 |
| 256 /** | 256 /** |
| 257 * The named constructors for this class are all conveniences for creating | 257 * The named constructors for this class are all conveniences for creating |
| 258 * instances using one of the known "skeleton" formats, and having code | 258 * instances using one of the known "skeleton" formats, and having code |
| 259 * completion support for discovering those formats. | 259 * completion support for discovering those formats. |
| 260 * So, | 260 * So, |
| 261 * new DateFormat.yMd("en_US") | 261 * new DateFormat.yMd("en_US") |
| 262 * is equivalent to | 262 * is equivalent to |
| 263 * new DateFormat("yMd", "en_US") | 263 * new DateFormat("yMd", "en_US") |
| 264 * To create a compound format you can use these constructors in combination | 264 * To create a compound format you can use these constructors in combination |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 List _reverse(List list) { | 561 List _reverse(List list) { |
| 562 // TODO(alanknight): Use standardized list reverse when implemented. | 562 // TODO(alanknight): Use standardized list reverse when implemented. |
| 563 // See Issue 2804. | 563 // See Issue 2804. |
| 564 var result = new List(); | 564 var result = new List(); |
| 565 for (var i = list.length-1; i >= 0; i--) { | 565 for (var i = list.length-1; i >= 0; i--) { |
| 566 result.addLast(list[i]); | 566 result.addLast(list[i]); |
| 567 } | 567 } |
| 568 return result; | 568 return result; |
| 569 } | 569 } |
| 570 } | 570 } |
| OLD | NEW |