RecurrencePattern("RRULE:FREQ=MONTHLY;;COUNT=10") throws #845
wangyoutian
announced in
Announcements
Replies: 2 comments
|
ical.net/Ical.Net.Tests/RecurrenceTests.cs Lines 3965 to 3982 in fa100df Likewise |
0 replies
|
Then what shall I do to parse a "RRule" like: ? I know I can retrieve the pattern part. But isnot there an outOfBox method? Please also note that sometimes we also have RDate and ExDate rules, as is the case in Google event recurrenceRules collecion. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The problem
The code:
used to work, but now does not work anymore.
The possible reason
To investigate the issue, I read the changes of the code, and found:
previously in:
65dc5ef#diff-45471ee45681820c5150e62ec4f25b69376bc9c87bb1fc6715722e5c48c76e57L185
the part of the string to be parsed is drawn by a regex at line 185:
new Regex(@"FREQ=(SECONDLY|MINUTELY|HOURLY|DAILY|WEEKLY|MONTHLY|YEARLY);?(.*)", _ciCompiled, RegexDefaults.Timeout);
but now in:
c7fd686#diff-45471ee45681820c5150e62ec4f25b69376bc9c87bb1fc6715722e5c48c76e57
,it's directly split by the code in line 221 :
value.Split(';');
// which would get :
RRULE:FREQ=MONTHLY
, and the key of which is unfortunately "RRULE:FREQ" by splitting by the '=' again.
what I shall do
I want to parse the rrule of a google calendar event. I browsed the code, finding no "Parse" method, but it seems that I can pass a string directly into the constructor, and that's what I'm doing. Note that for a google calendar event, the "Exdate" and "Rdate" rules might be used also.
What code shall I write to call some method of Ical.Net to achieve the above?
All reactions