Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 return { |
| 87 map["NAME"] = NAME; | 87 "NAME": NAME, |
|
Alan Knight
2014/01/28 01:33:46
I think the style guide would indent the map eleme
vicb
2014/01/28 07:52:45
Indentation fixed.
Not easy to change for a lambd
Alan Knight
2014/01/29 01:27:58
Why isn't that easy? foo() => { "hello" : 1, "wor
vicb
2014/01/29 08:15:14
I misunderstood... I was think of replacing the ma
| |
| 88 map["ERAS"] = ERAS; | 88 "ERAS": ERAS, |
| 89 map["ERANAMES"] = ERANAMES; | 89 "ERANAMES": ERANAMES, |
| 90 map["NARROWMONTHS"] = NARROWMONTHS; | 90 "NARROWMONTHS": NARROWMONTHS, |
| 91 map["STANDALONENARROWMONTHS"] = STANDALONENARROWMONTHS; | 91 "STANDALONENARROWMONTHS": STANDALONENARROWMONTHS, |
| 92 map["MONTHS"] = MONTHS; | 92 "MONTHS": MONTHS, |
| 93 map["STANDALONEMONTHS"] = STANDALONEMONTHS; | 93 "STANDALONEMONTHS": STANDALONEMONTHS, |
| 94 map["SHORTMONTHS"] = SHORTMONTHS; | 94 "SHORTMONTHS": SHORTMONTHS, |
| 95 map["STANDALONESHORTMONTHS"] = STANDALONESHORTMONTHS; | 95 "STANDALONESHORTMONTHS": STANDALONESHORTMONTHS, |
| 96 map["WEEKDAYS"] = WEEKDAYS; | 96 "WEEKDAYS": WEEKDAYS, |
| 97 map["STANDALONEWEEKDAYS"] = STANDALONEWEEKDAYS; | 97 "STANDALONEWEEKDAYS": STANDALONEWEEKDAYS, |
| 98 map["SHORTWEEKDAYS"] = SHORTWEEKDAYS; | 98 "SHORTWEEKDAYS": SHORTWEEKDAYS, |
| 99 map["STANDALONESHORTWEEKDAYS"] = STANDALONESHORTWEEKDAYS; | 99 "STANDALONESHORTWEEKDAYS": STANDALONESHORTWEEKDAYS, |
| 100 map["NARROWWEEKDAYS"] = NARROWWEEKDAYS; | 100 "NARROWWEEKDAYS": NARROWWEEKDAYS, |
| 101 map["STANDALONENARROWWEEKDAYS"] = STANDALONENARROWWEEKDAYS; | 101 "STANDALONENARROWWEEKDAYS": STANDALONENARROWWEEKDAYS, |
| 102 map["SHORTQUARTERS"] = SHORTQUARTERS; | 102 "SHORTQUARTERS": SHORTQUARTERS, |
| 103 map["QUARTERS"] = QUARTERS; | 103 "QUARTERS": QUARTERS, |
| 104 map["AMPMS"] = AMPMS; | 104 "AMPMS": AMPMS, |
| 105 map["DATEFORMATS"] = DATEFORMATS; | 105 "DATEFORMATS": DATEFORMATS, |
| 106 map["TIMEFORMATS"] = TIMEFORMATS; | 106 "TIMEFORMATS": TIMEFORMATS, |
| 107 map["AVAILABLEFORMATS"] = AVAILABLEFORMATS; | 107 "AVAILABLEFORMATS": AVAILABLEFORMATS, |
| 108 map["FIRSTDAYOFWEEK"] = FIRSTDAYOFWEEK; | 108 "FIRSTDAYOFWEEK": FIRSTDAYOFWEEK, |
| 109 map["WEEKENDRANGE"] = WEEKENDRANGE; | 109 "WEEKENDRANGE": WEEKENDRANGE, |
| 110 map["FIRSTWEEKCUTOFFDAY"] = FIRSTWEEKCUTOFFDAY; | 110 "FIRSTWEEKCUTOFFDAY": FIRSTWEEKCUTOFFDAY |
| 111 return map; | 111 }; |
| 112 } | 112 } |
| 113 | 113 |
| 114 toString() => NAME; | 114 toString() => NAME; |
| 115 } | 115 } |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * We hard-code the locale data for en_US here so that there's at least one | 118 * We hard-code the locale data for en_US here so that there's at least one |
| 119 * locale always available. | 119 * locale always available. |
| 120 */ | 120 */ |
| 121 var en_USSymbols = new DateSymbols( | 121 var en_USSymbols = new DateSymbols( |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ | 194 'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ |
| 195 'jmz': 'h:mm a z', // HOUR_MINUTETZ | 195 'jmz': 'h:mm a z', // HOUR_MINUTETZ |
| 196 'jz': 'h a z', // HOURGENERIC_TZ | 196 'jz': 'h a z', // HOURGENERIC_TZ |
| 197 'm': 'm', // MINUTE | 197 'm': 'm', // MINUTE |
| 198 'ms': 'mm:ss', // MINUTE_SECOND | 198 'ms': 'mm:ss', // MINUTE_SECOND |
| 199 's': 's', // SECOND | 199 's': 's', // SECOND |
| 200 'v': 'v', // ABBR_GENERIC_TZ | 200 'v': 'v', // ABBR_GENERIC_TZ |
| 201 'z': 'z', // ABBR_SPECIFIC_TZ | 201 'z': 'z', // ABBR_SPECIFIC_TZ |
| 202 'zzzz': 'zzzz', // SPECIFIC_TZ | 202 'zzzz': 'zzzz', // SPECIFIC_TZ |
| 203 'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ | 203 'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ |
| 204 }; | 204 }; |
| OLD | NEW |