Map an RRULE two-letter weekday code to Qt's day-of-week (1=Mon..7=Sun).
| 18 | |
| 19 | // Map an RRULE two-letter weekday code to Qt's day-of-week (1=Mon..7=Sun). |
| 20 | int weekdayFromCode(const QString& code) |
| 21 | { |
| 22 | static const QStringList kCodes = {"MO", "TU", "WE", "TH", "FR", "SA", "SU"}; |
| 23 | const int idx = kCodes.indexOf(code.trimmed().toUpper()); |
| 24 | return idx < 0 ? 0 : idx + 1; |
| 25 | } |
| 26 | |
| 27 | QString weekdayLongName(int qtDow) |
| 28 | { |