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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 map["DATEFORMATS"] = DATEFORMATS; | 105 map["DATEFORMATS"] = DATEFORMATS; |
106 map["TIMEFORMATS"] = TIMEFORMATS; | 106 map["TIMEFORMATS"] = TIMEFORMATS; |
107 map["AVAILABLEFORMATS"] = AVAILABLEFORMATS; | 107 map["AVAILABLEFORMATS"] = AVAILABLEFORMATS; |
108 map["FIRSTDAYOFWEEK"] = FIRSTDAYOFWEEK; | 108 map["FIRSTDAYOFWEEK"] = FIRSTDAYOFWEEK; |
109 map["WEEKENDRANGE"] = WEEKENDRANGE; | 109 map["WEEKENDRANGE"] = WEEKENDRANGE; |
110 map["FIRSTWEEKCUTOFFDAY"] = FIRSTWEEKCUTOFFDAY; | 110 map["FIRSTWEEKCUTOFFDAY"] = FIRSTWEEKCUTOFFDAY; |
111 return map; | 111 return map; |
112 } | 112 } |
113 | 113 |
114 toString() => NAME; | 114 toString() => NAME; |
115 } | 115 } |
| 116 |
| 117 /** |
| 118 * We hard-code the locale data for en_US here so that there's at least one |
| 119 * locale always available. |
| 120 */ |
| 121 var en_USSymbols = new DateSymbols( |
| 122 NAME: "en_US", |
| 123 ERAS: const [ 'BC', 'AD'], |
| 124 ERANAMES: const [ 'Before Christ', 'Anno Domini'], |
| 125 NARROWMONTHS: const [ 'J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', |
| 126 'N', 'D'], |
| 127 STANDALONENARROWMONTHS: const [ 'J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', |
| 128 'S', 'O', 'N', 'D'], |
| 129 MONTHS: const [ 'January', 'February', 'March', 'April', 'May', 'June', |
| 130 'July', 'August', 'September', 'October', 'November', 'December'], |
| 131 STANDALONEMONTHS: const [ 'January', 'February', 'March', 'April', 'May', |
| 132 'June', 'July', 'August', 'September', 'October', 'November', |
| 133 'December'], |
| 134 SHORTMONTHS: const [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', |
| 135 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], |
| 136 STANDALONESHORTMONTHS: const [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', |
| 137 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], |
| 138 WEEKDAYS: const [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', |
| 139 'Friday', 'Saturday'], |
| 140 STANDALONEWEEKDAYS: const [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', |
| 141 'Thursday', 'Friday', 'Saturday'], |
| 142 SHORTWEEKDAYS: const [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], |
| 143 STANDALONESHORTWEEKDAYS: const [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', |
| 144 'Sat'], |
| 145 NARROWWEEKDAYS: const [ 'S', 'M', 'T', 'W', 'T', 'F', 'S'], |
| 146 STANDALONENARROWWEEKDAYS: const [ 'S', 'M', 'T', 'W', 'T', 'F', 'S'], |
| 147 SHORTQUARTERS: const [ 'Q1', 'Q2', 'Q3', 'Q4'], |
| 148 QUARTERS: const [ '1st quarter', '2nd quarter', '3rd quarter', |
| 149 '4th quarter'], |
| 150 AMPMS: const [ 'AM', 'PM'], |
| 151 DATEFORMATS: const [ 'EEEE, MMMM d, y', 'MMMM d, y', 'MMM d, y', |
| 152 'M/d/yy'], |
| 153 TIMEFORMATS: const [ 'h:mm:ss a zzzz', 'h:mm:ss a z', 'h:mm:ss a', |
| 154 'h:mm a'], |
| 155 FIRSTDAYOFWEEK: 6, |
| 156 WEEKENDRANGE: const [5, 6], |
| 157 FIRSTWEEKCUTOFFDAY: 5); |
| 158 |
| 159 var en_USPatterns = const { |
| 160 'd': 'd', // DAY |
| 161 'E': 'EEE', // ABBR_WEEKDAY |
| 162 'EEEE': 'EEEE', // WEEKDAY |
| 163 'LLL': 'LLL', // ABBR_STANDALONE_MONTH |
| 164 'LLLL': 'LLLL', // STANDALONE_MONTH |
| 165 'M': 'L', // NUM_MONTH |
| 166 'Md': 'M/d', // NUM_MONTH_DAY |
| 167 'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY |
| 168 'MMM': 'LLL', // ABBR_MONTH |
| 169 'MMMd': 'MMM d', // ABBR_MONTH_DAY |
| 170 'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY |
| 171 'MMMM': 'LLLL', // MONTH |
| 172 'MMMMd': 'MMMM d', // MONTH_DAY |
| 173 'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY |
| 174 'QQQ': 'QQQ', // ABBR_QUARTER |
| 175 'QQQQ': 'QQQQ', // QUARTER |
| 176 'y': 'y', // YEAR |
| 177 'yM': 'M/y', // YEAR_NUM_MONTH |
| 178 'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY |
| 179 'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY |
| 180 'yMMM': 'MMM y', // YEAR_ABBR_MONTH |
| 181 'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY |
| 182 'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY |
| 183 'yMMMM': 'MMMM y', // YEAR_MONTH |
| 184 'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY |
| 185 'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY |
| 186 'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER |
| 187 'yQQQQ': 'QQQQ y', // YEAR_QUARTER |
| 188 'H': 'HH', // HOUR24 |
| 189 'Hm': 'HH:mm', // HOUR24_MINUTE |
| 190 'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND |
| 191 'j': 'h a', // HOUR |
| 192 'jm': 'h:mm a', // HOUR_MINUTE |
| 193 'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND |
| 194 'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ |
| 195 'jmz': 'h:mm a z', // HOUR_MINUTETZ |
| 196 'jz': 'h a z', // HOURGENERIC_TZ |
| 197 'm': 'm', // MINUTE |
| 198 'ms': 'mm:ss', // MINUTE_SECOND |
| 199 's': 's', // SECOND |
| 200 'v': 'v', // ABBR_GENERIC_TZ |
| 201 'z': 'z', // ABBR_SPECIFIC_TZ |
| 202 'zzzz': 'zzzz', // SPECIFIC_TZ |
| 203 'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ |
| 204 }; |
OLD | NEW |