'How to specify the first day of week in Outlook RecurrencePattern of AppointmentItem?
In OOM, is there a way to specify the assumed first day of the week, like WKST parameter in ICS RULE section?
When I save a calendar from Outlook, I see that it adds WKST=SU in RRULE but I don't know how to change this when creating an recurring event programmatically so that the rule I'm creating was calculated on different condition (I want Monday to be the first day of the week).
Currently, it causes incorrect calculation of occurrences for the pattern like this:
DTSTART;TZID="Arabic Standard Time":20180125T170000
RRULE:FREQ=WEEKLY;COUNT=2;INTERVAL=2;BYDAY=SU,TH,SA
On CalDAV server, it fires on 28 Jan 2018 (Sunday) but not in Outlook. The CalDAV server assumes Monday is the first day of week, Outlook assumes Sunday. BTW, looks like there is a bug in Outlook as well (as I have Monday set as the first day of week in Outlook settings but this does not have effect on creating appointments programmatically), at least in Outlook 2010 version I'm using.
With ICS, I can specify
RRULE:FREQ=WEEKLY;COUNT=2;INTERVAL=2;BYDAY=SU,TH,SA;WKST=MO
But can't figure out the way to do the same with OOM.
Solution 1:[1]
First day of week is set in the recurrence blob - it is only accessible through Extended MAPI (C++ or Delphi) if you build the recurrence blob yourself (not for the fainthearted). Redemption (I am its author) exposes RDORecurrencePattern.FirstDayOfWeek
property.
That being said, did you set the right first day of week in the Control Panel (Region | Additional Settings | Date)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |