| 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 library date_symbols; | 4 library date_symbols; |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This holds onto information about how a particular locale formats dates. It | 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, | 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 | 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 | 10 * for instances of these to be generated out of ICU or a similar reference |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 QUARTERS = map["QUARTERS"]; | 75 QUARTERS = map["QUARTERS"]; |
| 76 AMPMS = map["AMPMS"]; | 76 AMPMS = map["AMPMS"]; |
| 77 DATEFORMATS = map["DATEFORMATS"]; | 77 DATEFORMATS = map["DATEFORMATS"]; |
| 78 TIMEFORMATS = map["TIMEFORMATS"]; | 78 TIMEFORMATS = map["TIMEFORMATS"]; |
| 79 AVAILABLEFORMATS = map["AVAILABLEFORMATS"]; | 79 AVAILABLEFORMATS = map["AVAILABLEFORMATS"]; |
| 80 FIRSTDAYOFWEEK = map["FIRSTDAYOFWEEK"]; | 80 FIRSTDAYOFWEEK = map["FIRSTDAYOFWEEK"]; |
| 81 WEEKENDRANGE = map["WEEKENDRANGE"]; | 81 WEEKENDRANGE = map["WEEKENDRANGE"]; |
| 82 FIRSTWEEKCUTOFFDAY = map["FIRSTWEEKCUTOFFDAY"]; | 82 FIRSTWEEKCUTOFFDAY = map["FIRSTWEEKCUTOFFDAY"]; |
| 83 } | 83 } |
| 84 | 84 |
| 85 Map serializeToMap() { | 85 Map serializeToMap() => { |
| 86 var map = new Map(); | 86 "NAME": NAME, |
| 87 map["NAME"] = NAME; | 87 "ERAS": ERAS, |
| 88 map["ERAS"] = ERAS; | 88 "ERANAMES": ERANAMES, |
| 89 map["ERANAMES"] = ERANAMES; | 89 "NARROWMONTHS": NARROWMONTHS, |
| 90 map["NARROWMONTHS"] = NARROWMONTHS; | 90 "STANDALONENARROWMONTHS": STANDALONENARROWMONTHS, |
| 91 map["STANDALONENARROWMONTHS"] = STANDALONENARROWMONTHS; | 91 "MONTHS": MONTHS, |
| 92 map["MONTHS"] = MONTHS; | 92 "STANDALONEMONTHS": STANDALONEMONTHS, |
| 93 map["STANDALONEMONTHS"] = STANDALONEMONTHS; | 93 "SHORTMONTHS": SHORTMONTHS, |
| 94 map["SHORTMONTHS"] = SHORTMONTHS; | 94 "STANDALONESHORTMONTHS": STANDALONESHORTMONTHS, |
| 95 map["STANDALONESHORTMONTHS"] = STANDALONESHORTMONTHS; | 95 "WEEKDAYS": WEEKDAYS, |
| 96 map["WEEKDAYS"] = WEEKDAYS; | 96 "STANDALONEWEEKDAYS": STANDALONEWEEKDAYS, |
| 97 map["STANDALONEWEEKDAYS"] = STANDALONEWEEKDAYS; | 97 "SHORTWEEKDAYS": SHORTWEEKDAYS, |
| 98 map["SHORTWEEKDAYS"] = SHORTWEEKDAYS; | 98 "STANDALONESHORTWEEKDAYS": STANDALONESHORTWEEKDAYS, |
| 99 map["STANDALONESHORTWEEKDAYS"] = STANDALONESHORTWEEKDAYS; | 99 "NARROWWEEKDAYS": NARROWWEEKDAYS, |
| 100 map["NARROWWEEKDAYS"] = NARROWWEEKDAYS; | 100 "STANDALONENARROWWEEKDAYS": STANDALONENARROWWEEKDAYS, |
| 101 map["STANDALONENARROWWEEKDAYS"] = STANDALONENARROWWEEKDAYS; | 101 "SHORTQUARTERS": SHORTQUARTERS, |
| 102 map["SHORTQUARTERS"] = SHORTQUARTERS; | 102 "QUARTERS": QUARTERS, |
| 103 map["QUARTERS"] = QUARTERS; | 103 "AMPMS": AMPMS, |
| 104 map["AMPMS"] = AMPMS; | 104 "DATEFORMATS": DATEFORMATS, |
| 105 map["DATEFORMATS"] = DATEFORMATS; | 105 "TIMEFORMATS": TIMEFORMATS, |
| 106 map["TIMEFORMATS"] = TIMEFORMATS; | 106 "AVAILABLEFORMATS": AVAILABLEFORMATS, |
| 107 map["AVAILABLEFORMATS"] = AVAILABLEFORMATS; | 107 "FIRSTDAYOFWEEK": FIRSTDAYOFWEEK, |
| 108 map["FIRSTDAYOFWEEK"] = FIRSTDAYOFWEEK; | 108 "WEEKENDRANGE": WEEKENDRANGE, |
| 109 map["WEEKENDRANGE"] = WEEKENDRANGE; | 109 "FIRSTWEEKCUTOFFDAY": FIRSTWEEKCUTOFFDAY |
| 110 map["FIRSTWEEKCUTOFFDAY"] = FIRSTWEEKCUTOFFDAY; | 110 }; |
| 111 return map; | |
| 112 } | |
| 113 | 111 |
| 114 toString() => NAME; | 112 toString() => NAME; |
| 115 } | 113 } |
| 116 | 114 |
| 117 /** | 115 /** |
| 118 * We hard-code the locale data for en_US here so that there's at least one | 116 * We hard-code the locale data for en_US here so that there's at least one |
| 119 * locale always available. | 117 * locale always available. |
| 120 */ | 118 */ |
| 121 var en_USSymbols = new DateSymbols( | 119 var en_USSymbols = new DateSymbols( |
| 122 NAME: "en_US", | 120 NAME: "en_US", |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ | 192 'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ |
| 195 'jmz': 'h:mm a z', // HOUR_MINUTETZ | 193 'jmz': 'h:mm a z', // HOUR_MINUTETZ |
| 196 'jz': 'h a z', // HOURGENERIC_TZ | 194 'jz': 'h a z', // HOURGENERIC_TZ |
| 197 'm': 'm', // MINUTE | 195 'm': 'm', // MINUTE |
| 198 'ms': 'mm:ss', // MINUTE_SECOND | 196 'ms': 'mm:ss', // MINUTE_SECOND |
| 199 's': 's', // SECOND | 197 's': 's', // SECOND |
| 200 'v': 'v', // ABBR_GENERIC_TZ | 198 'v': 'v', // ABBR_GENERIC_TZ |
| 201 'z': 'z', // ABBR_SPECIFIC_TZ | 199 'z': 'z', // ABBR_SPECIFIC_TZ |
| 202 'zzzz': 'zzzz', // SPECIFIC_TZ | 200 'zzzz': 'zzzz', // SPECIFIC_TZ |
| 203 'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ | 201 'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ |
| 204 }; | 202 }; |
| OLD | NEW |