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

RRULE BYDAY not working properly #25

Open
rjgpereira opened this issue Oct 19, 2016 · 0 comments
Open

RRULE BYDAY not working properly #25

rjgpereira opened this issue Oct 19, 2016 · 0 comments

Comments

@rjgpereira
Copy link

rjgpereira commented Oct 19, 2016

Hi!

First of all, congrats on this parser! It's really great! However I found out that the BYDAY RRULE is not take into account. For instance, this event:

BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20160311T083000
DTEND;TZID=America/Los_Angeles:20160311T103000
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2FR
DTSTAMP:20161018T143425Z
UID:[email protected]
CLASS:PUBLIC
CREATED:20160224T023810Z
DESCRIPTION:
LAST-MODIFIED:20160822T045008Z
LOCATION:Some Location
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY: The Summary
TRANSP:OPAQUE
END:VEVENT

should only occur on the 2nd Friday every month and now it's repeating every Friday.

I know you have this block of code for that:

// These checks are to catch if the event is set to repeat on a particular weekday of the month (e.g., every third Sunday)
if (repeatRuleByDay && ![repeatRuleByDay containsObject:[NSString stringWithFormat:@"1%@", dayString]]) {
    if (repeatRuleByDay && ![repeatRuleByDay containsObject:[NSString stringWithFormat:@"2%@", dayString]]) {
        if (repeatRuleByDay && ![repeatRuleByDay containsObject:[NSString stringWithFormat:@"3%@", dayString]]) {

            return NO;
         }
    }
}

but this isn't working.

Can you help me with this?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant