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

Unified Diff: lib/i18n/date_symbols.dart

Issue 10807096: Add date formatting and parsing code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
Index: lib/i18n/date_symbols.dart
===================================================================
--- lib/i18n/date_symbols.dart (revision 0)
+++ lib/i18n/date_symbols.dart (revision 0)
@@ -0,0 +1,52 @@
+#library("date_format_for_locale");
+
+/**
+ * This holds onto information about how a particular locale formats dates. It
Emily Fortuna 2012/07/31 05:52:53 this this file generated? If so, please say so in
Alan Knight 2012/08/03 23:02:15 It's not. The generated files do say so.
+ * contains mostly strings, e.g. what the names of months or weekdays are,
+ * but also indicates things like the first day of the week. We expect the data
+ * for instances of these to be generated out of ICU or a similar reference
+ * source. This is used in conjunction with the date_time_patterns, which
+ * defines for a particular locale the different named formats that will
+ * make use of this data.
+ */
+class DateSymbols {
+ final String NAME;
+ final List<String> ERAS,ERANAMES,NARROWMONTHS,STANDALONENARROWMONTHS, MONTHS,
+ STANDALONEMONTHS, SHORTMONTHS,STANDALONESHORTMONTHS,WEEKDAYS,
Emily Fortuna 2012/07/31 05:52:53 indent 2 more spaces here if the line is broken. A
Alan Knight 2012/08/03 23:02:15 First two done. The constant names are from Shanji
+ STANDALONEWEEKDAYS, SHORTWEEKDAYS, STANDALONESHORTWEEKDAYS,
+ NARROWWEEKDAYS,STANDALONENARROWWEEKDAYS,SHORTQUARTERS,
+ QUARTERS, AMPMS,DATEFORMATS,TIMEFORMATS;
+ final Map<String,String> AVAILABLEFORMATS;
+ final int FIRSTDAYOFWEEK;
+ final List<int> WEEKENDRANGE;
+ final int FIRSTWEEKCUTOFFDAY;
+
+ const DateSymbols([this.NAME,
+ this.ERAS,
+ this.ERANAMES,
+ this.NARROWMONTHS,
+ this.STANDALONENARROWMONTHS,
+ this.MONTHS,
+ this.STANDALONEMONTHS,
+ this.SHORTMONTHS,
+ this.STANDALONESHORTMONTHS,
+ this.WEEKDAYS,
+ this.STANDALONEWEEKDAYS,
+ this.SHORTWEEKDAYS,
+ this.STANDALONESHORTWEEKDAYS,
+ this.NARROWWEEKDAYS,
+ this.STANDALONENARROWWEEKDAYS,
+ this.SHORTQUARTERS,
+ this.QUARTERS,
+ this.AMPMS,
+ this.DATEFORMATS,
+ this.TIMEFORMATS,
+ this.AVAILABLEFORMATS,
+ this.FIRSTDAYOFWEEK,
+ this.WEEKENDRANGE,
+ this.FIRSTWEEKCUTOFFDAY]
+ );
Emily Fortuna 2012/07/31 05:52:53 move this up to the above line.
Alan Knight 2012/08/03 23:02:15 Done.
+
+ toString() => NAME;
+}
+

Powered by Google App Engine
This is Rietveld 408576698