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

Unified Diff: pkg/intl/lib/date_format.dart

Issue 12918018: Update Intl's json data file generation to current APIs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also remove polyfill reversing method Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/intl/tool/generate_locale_data_files.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/date_format.dart
diff --git a/pkg/intl/lib/date_format.dart b/pkg/intl/lib/date_format.dart
index a0d964ffa8695e71057abebb29123edfbe186cdf..88b54d66433ceba4e0038cfe658d2f9174591637 100644
--- a/pkg/intl/lib/date_format.dart
+++ b/pkg/intl/lib/date_format.dart
@@ -558,7 +558,7 @@ class DateFormat {
/** Parse the template pattern and return a list of field objects.*/
List parsePattern(String pattern) {
if (pattern == null) return null;
- return _reverse(_parsePatternHelper(pattern));
+ return _parsePatternHelper(pattern).reversed.toList();
}
/** Recursive helper for parsing the template pattern. */
@@ -584,15 +584,4 @@ class DateFormat {
}
}
}
-
- /** Polyfill for missing library function. */
- List _reverse(List list) {
Emily Fortuna 2013/03/18 22:45:15 yay!
- // TODO(alanknight): Use standardized list reverse when implemented.
- // See Issue 2804.
- var result = new List();
- for (var i = list.length-1; i >= 0; i--) {
- result.addLast(list[i]);
- }
- return result;
- }
}
« no previous file with comments | « no previous file | pkg/intl/tool/generate_locale_data_files.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698