Changeset View
Changeset View
Standalone View
Standalone View
src/icaltimezones.cpp
Show First 20 Lines • Show All 380 Lines • ▼ Show 20 Line(s) | 359 | while (!rdates.isEmpty()) { | |||
---|---|---|---|---|---|
381 | times.prepend(qdt); | 381 | times.prepend(qdt); | ||
382 | rdates.pop_back(); | 382 | rdates.pop_back(); | ||
383 | } | 383 | } | ||
384 | if (times.count() > (useNewRRULE ? minPhaseCount : minRuleCount)) { | 384 | if (times.count() > (useNewRRULE ? minPhaseCount : minRuleCount)) { | ||
385 | // There are enough dates to combine into an RRULE | 385 | // There are enough dates to combine into an RRULE | ||
386 | icalrecurrencetype r; | 386 | icalrecurrencetype r; | ||
387 | icalrecurrencetype_clear(&r); | 387 | icalrecurrencetype_clear(&r); | ||
388 | r.freq = ICAL_YEARLY_RECURRENCE; | 388 | r.freq = ICAL_YEARLY_RECURRENCE; | ||
389 | r.count = (year >= 2030) ? 0 : times.count() - 1; | | |||
390 | r.by_month[0] = month; | 389 | r.by_month[0] = month; | ||
391 | if (rule & DAY_OF_MONTH) { | 390 | if (rule & DAY_OF_MONTH) { | ||
392 | r.by_month_day[0] = dayOfMonth; | 391 | r.by_month_day[0] = dayOfMonth; | ||
393 | } else if (rule & WEEKDAY_OF_MONTH) { | 392 | } else if (rule & WEEKDAY_OF_MONTH) { | ||
394 | r.by_day[0] = (dayOfWeek % 7 + 1) + (nthFromStart * 8); // Sunday = 1 | 393 | r.by_day[0] = (dayOfWeek % 7 + 1) + (nthFromStart * 8); // Sunday = 1 | ||
395 | } else if (rule & LAST_WEEKDAY_OF_MONTH) { | 394 | } else if (rule & LAST_WEEKDAY_OF_MONTH) { | ||
396 | r.by_day[0] = -(dayOfWeek % 7 + 1) - (nthFromEnd * 8); // Sunday = 1 | 395 | r.by_day[0] = -(dayOfWeek % 7 + 1) - (nthFromEnd * 8); // Sunday = 1 | ||
397 | } | 396 | } | ||
▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines |