Skip to content

Commit

Permalink
oxcical: check BY_SETPOS according to RFC 5545
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Langfermann authored and jengelh committed Jul 12, 2024
1 parent 9b690e1 commit 713d40b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/mapi/oxcical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,9 @@ static bool oxcical_parse_rrule(const ical_component &tzcom,
tmp_int = 5;
apr->recur_pat.pts.monthnth.recurnum = tmp_int;
} else {
if (irrule.check_bymask(RRULE_BY_DAY) ||
irrule.check_bymask(RRULE_BY_SETPOS))
/* Cf. RFC 5545 pg. 43, "rule: BY_SETPOS" */
if (irrule.check_bymask(RRULE_BY_DAY) &&
!irrule.check_bymask(RRULE_BY_SETPOS))
return false;
int tmp_int;
patterntype = PATTERNTYPE_MONTH;
Expand Down
53 changes: 53 additions & 0 deletions tests/gxl-475.ics
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:W. Europe Standard Time
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER:MAILTO:organizer@localhost
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:MAILTO:pexip_
meeting_service@localhost
DESCRIPTION;LANGUAGE=de-DE:Liebe Kolleginnen und Kollegen\,\n\nanbei finden
RRULE:FREQ=MONTHLY;COUNT=6;INTERVAL=1;BYDAY=2MO
UID:040000008200E00074C5B7101A82E0080000000000628DD5412CDA01000000000000000
010000000364A1A3FF3EE024AAF97479096254D81
SUMMARY;LANGUAGE=de-DE:AK FNH JF
DTSTART;TZID=W. Europe Standard Time:20240108T130000
DTEND;TZID=W. Europe Standard Time:20240108T150000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20231211T135716Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=de-DE:Meeting Service
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:1613481959
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
BEGIN:VALARM
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR

0 comments on commit 713d40b

Please sign in to comment.