* Get locale dependent month names * * A method not present in the Adobe Javascript APIs reference. We add it here for our convenience. Not to be used externally. */
| 235 | * A method not present in the Adobe Javascript APIs reference. We add it here for our convenience. Not to be used externally. |
| 236 | */ |
| 237 | QStringList JSUtil::getMonths() const |
| 238 | { |
| 239 | QLocale defaultLocale; |
| 240 | QStringList monthNames; |
| 241 | // add both long and short format dates for processing in parseDate method. |
| 242 | for (int i = 1; i <= 12; i++) { |
| 243 | monthNames << defaultLocale.monthName(i, QLocale::LongFormat).toUpper(); |
| 244 | monthNames << defaultLocale.monthName(i, QLocale::ShortFormat).toUpper(); |
| 245 | } |
| 246 | return monthNames; |
| 247 | } |