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 // TODO(efortuna): Customized pattern system -- suggested by i18n needs | 7 // TODO(efortuna): Customized pattern system -- suggested by i18n needs |
8 // feedback on appropriateness. | 8 // feedback on appropriateness. |
9 /** | 9 /** |
10 * DateFormat is for formatting and parsing dates in a locale-sensitive | 10 * DateFormat is for formatting and parsing dates in a locale-sensitive |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 /** | 273 /** |
274 * Return the locale code in which we operate, e.g. 'en_US' or 'pt'. | 274 * Return the locale code in which we operate, e.g. 'en_US' or 'pt'. |
275 */ | 275 */ |
276 String get locale => _locale; | 276 String get locale => _locale; |
277 | 277 |
278 /** | 278 /** |
279 * Returns a list of all locales for which we have date formatting | 279 * Returns a list of all locales for which we have date formatting |
280 * information. | 280 * information. |
281 */ | 281 */ |
282 static List<String> allLocalesWithSymbols() => dateTimeSymbols.keys; | 282 static List<String> allLocalesWithSymbols() => dateTimeSymbols.keys.toList(); |
283 | 283 |
284 /** | 284 /** |
285 * The named constructors for this class are all conveniences for creating | 285 * The named constructors for this class are all conveniences for creating |
286 * instances using one of the known "skeleton" formats, and having code | 286 * instances using one of the known "skeleton" formats, and having code |
287 * completion support for discovering those formats. | 287 * completion support for discovering those formats. |
288 * So, | 288 * So, |
289 * new DateFormat.yMd("en_US") | 289 * new DateFormat.yMd("en_US") |
290 * is equivalent to | 290 * is equivalent to |
291 * new DateFormat("yMd", "en_US") | 291 * new DateFormat("yMd", "en_US") |
292 * To create a compound format you can use these constructors in combination | 292 * 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... |
589 List _reverse(List list) { | 589 List _reverse(List list) { |
590 // TODO(alanknight): Use standardized list reverse when implemented. | 590 // TODO(alanknight): Use standardized list reverse when implemented. |
591 // See Issue 2804. | 591 // See Issue 2804. |
592 var result = new List(); | 592 var result = new List(); |
593 for (var i = list.length-1; i >= 0; i--) { | 593 for (var i = list.length-1; i >= 0; i--) { |
594 result.addLast(list[i]); | 594 result.addLast(list[i]); |
595 } | 595 } |
596 return result; | 596 return result; |
597 } | 597 } |
598 } | 598 } |
OLD | NEW |