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

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

Issue 14604009: Add a dateSymbols getter to DateFormat, useful to get e.g. the list of weekday names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/test/date_time_format_test_core.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 ce79f2feac16601cf661bb261bfdb3884d52aec0..202ae1b4cb83957f287566a4225ade55731e02cb 100644
--- a/pkg/intl/lib/date_format.dart
+++ b/pkg/intl/lib/date_format.dart
@@ -534,6 +534,15 @@ class DateFormat {
}
/**
+ * Return the [DateSymbol] information for the locale. This can be useful
+ * to find lists like the names of weekdays or months in a locale, but
+ * the structure of this data may change, and it's generally better to go
+ * through the [format] and [parse] APIs. If the locale isn't present, or
+ * is uninitialized, returns null;
+ */
+ DateSymbols get dateSymbols => dateTimeSymbols[_locale];
+
+ /**
* Set the locale. If the locale can't be found, we also look up
* based on alternative versions, e.g. if we have no 'en_CA' we will
* look for 'en' as a fallback. It will also translate en-ca into en_CA.
« no previous file with comments | « no previous file | pkg/intl/test/date_time_format_test_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698