OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 #library("date_symbols"); |
| 5 |
| 6 /** |
| 7 * This holds onto information about how a particular locale formats dates. It |
| 8 * contains mostly strings, e.g. what the names of months or weekdays are, |
| 9 * but also indicates things like the first day of the week. We expect the data |
| 10 * for instances of these to be generated out of ICU or a similar reference |
| 11 * source. This is used in conjunction with the date_time_patterns, which |
| 12 * defines for a particular locale the different named formats that will |
| 13 * make use of this data. |
| 14 */ |
| 15 class DateSymbols { |
| 16 final String NAME; |
| 17 final List<String> ERAS,ERANAMES,NARROWMONTHS,STANDALONENARROWMONTHS, MONTHS, |
| 18 STANDALONEMONTHS, SHORTMONTHS, STANDALONESHORTMONTHS, WEEKDAYS, |
| 19 STANDALONEWEEKDAYS, SHORTWEEKDAYS, STANDALONESHORTWEEKDAYS, |
| 20 NARROWWEEKDAYS, STANDALONENARROWWEEKDAYS, SHORTQUARTERS, |
| 21 QUARTERS, AMPMS, DATEFORMATS, TIMEFORMATS; |
| 22 final Map<String,String> AVAILABLEFORMATS; |
| 23 final int FIRSTDAYOFWEEK; |
| 24 final List<int> WEEKENDRANGE; |
| 25 final int FIRSTWEEKCUTOFFDAY; |
| 26 |
| 27 const DateSymbols([this.NAME, |
| 28 this.ERAS, |
| 29 this.ERANAMES, |
| 30 this.NARROWMONTHS, |
| 31 this.STANDALONENARROWMONTHS, |
| 32 this.MONTHS, |
| 33 this.STANDALONEMONTHS, |
| 34 this.SHORTMONTHS, |
| 35 this.STANDALONESHORTMONTHS, |
| 36 this.WEEKDAYS, |
| 37 this.STANDALONEWEEKDAYS, |
| 38 this.SHORTWEEKDAYS, |
| 39 this.STANDALONESHORTWEEKDAYS, |
| 40 this.NARROWWEEKDAYS, |
| 41 this.STANDALONENARROWWEEKDAYS, |
| 42 this.SHORTQUARTERS, |
| 43 this.QUARTERS, |
| 44 this.AMPMS, |
| 45 this.DATEFORMATS, |
| 46 this.TIMEFORMATS, |
| 47 this.AVAILABLEFORMATS, |
| 48 this.FIRSTDAYOFWEEK, |
| 49 this.WEEKENDRANGE, |
| 50 this.FIRSTWEEKCUTOFFDAY]); |
| 51 |
| 52 toString() => NAME; |
| 53 } |
OLD | NEW |