Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'count' into 'master'
Browse files Browse the repository at this point in the history
[kcalcore] Use UNTIL in RRULE for VTIMEZONE. Contributes to JB#47814

See merge request mer-core/kcalcore!20
  • Loading branch information
chriadam committed Nov 3, 2020
2 parents d2eb2d4 + d99a969 commit 1522c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcalcore/icaltimezones.cpp
Expand Up @@ -711,7 +711,6 @@ ICalTimeZoneData::ICalTimeZoneData( const KTimeZoneData &rhs,
icalrecurrencetype r;
icalrecurrencetype_clear( &r );
r.freq = ICAL_YEARLY_RECURRENCE;
r.count = ( year >= 2030 ) ? 0 : times.count() - 1;
r.by_month[0] = month;
if ( rule & DAY_OF_MONTH ) {
r.by_month_day[0] = dayOfMonth;
Expand All @@ -720,6 +719,7 @@ ICalTimeZoneData::ICalTimeZoneData( const KTimeZoneData &rhs,
} else if ( rule & LAST_WEEKDAY_OF_MONTH ) {
r.by_day[0] = -( dayOfWeek % 7 + 1 ) - ( nthFromEnd * 8 ); // Sunday = 1
}
r.until = writeLocalICalDateTime(times.takeAt(times.size() - 1), preOffset);
icalproperty *prop = icalproperty_new_rrule( r );
if ( useNewRRULE ) {
// This RRULE doesn't start from the phase start date, so set it into
Expand Down

0 comments on commit 1522c3d

Please sign in to comment.