Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Recurrence Like Iphone Calendar #41

Closed
samktest opened this issue Nov 27, 2017 · 1 comment
Closed

Generate Recurrence Like Iphone Calendar #41

samktest opened this issue Nov 27, 2017 · 1 comment
Labels

Comments

@samktest
Copy link

how to design rrule for iphone recurring event process
1.Freq=monthly and i want to repeat that event on fifth or last weekday or fifth or last weekend days
so how i can do that with rrule can you provide some guidelines to create recurring events as like iphone calendar works
image

@rlanvin
Copy link
Owner

rlanvin commented Nov 27, 2017

Why don't you look at how the iPhone is storing those events? I'm sure you can export them in iCal format and look at the RRULE part, and just copy it.

can you provide some guidelines to create recurring events as like iphone calendar works

I'll give you some pointers, but please understand this library is only a parser for RRULE/iCalendar format. So if you are now sure how to use this syntax, the easier is simply to copy the rules generated by the iPhone. For more detailed info please refer to the RFC 5545, as well as the wiki.

Nth day, when day is named explicitly

Use BYDAY with an integer. Examples: BYDAY=1MO is the first Monday, 2MO is the second Monday, -1MO is the last Monday, and so on. Multiple days can be combined.

Nth day, when "day" is not named explicitely

Use BYMONTHDAY or BYYEARDAY. BYMONTHDAY=3 is the 3rd day of the month, -1 is the last day of the month, BYYEARDAY=1 is the first day of the year, and so on. Multiple days can be combined.

Nth weekday/weekend day

Use a combination of BYDAY and BYSETPOS. For example "the last weekday of the month" could be represented as:

   FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1

Hope this helps.

@rlanvin rlanvin closed this as completed Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants