-
Notifications
You must be signed in to change notification settings - Fork 24
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
Does this library follow RFC5545 which obsoletes the RFC2445 (since 2009)? #46
Comments
leoarnold
added a commit
to leoarnold/ruby-rrule
that referenced
this issue
Jul 4, 2022
Closes square#46. Fixes square#47. Prior to this commit the gem failed to validate the RRULE's syntax: * If a keyword was misspelled, it would *silently* be ignored * If a keyword appeared multiple times only the last occurance was used * If the mutually exclusive keywords COUNT and UNTIL were used together then no exception was raised ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') => #<RRule::Rule:0x000055db33885018 ... > rrule.instance_variable_get(:@options) => {:interval=>1, :wkst=>1, :freq=>"DAILY", :count=>7, :until=>2020-03-02 00:00:00 +0100, ... ``` Therefore we add a validating parser with comprehensive error messages: ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') Traceback (most recent call last): ... RRule::InvalidRRule (SyntaxError) * unknown keyword 'INTERVALLLLL' at position 42: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^^^^^^^^ * keyword 'COUNT' appeared more than once at positions 11 and 19: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ * keywords 'COUNT' and 'UNTIL' are mutually exclusive at positions 11, 19 and 27: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ ^^^^^ ```
leoarnold
added a commit
to leoarnold/ruby-rrule
that referenced
this issue
Jul 4, 2022
Closes square#46. Fixes square#47. Prior to this commit the gem failed to validate the RRULE's syntax: * If a keyword was misspelled, it would *silently* be ignored * If a keyword appeared multiple times only the last occurance was used * If the mutually exclusive keywords COUNT and UNTIL were used together then no exception was raised ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') => #<RRule::Rule:0x000055db33885018 ... > rrule.instance_variable_get(:@options) => {:interval=>1, :wkst=>1, :freq=>"DAILY", :count=>7, :until=>2020-03-02 00:00:00 +0100, ... ``` Therefore we add a validating parser with comprehensive error messages: ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') Traceback (most recent call last): ... RRule::InvalidRRule (SyntaxError) * unknown keyword 'INTERVALLLLL' at position 42: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^^^^^^^^ * keyword 'COUNT' appeared more than once at positions 11 and 19: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ * keywords 'COUNT' and 'UNTIL' are mutually exclusive at positions 11, 19 and 27: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ ^^^^^ ```
leoarnold
added a commit
to leoarnold/ruby-rrule
that referenced
this issue
Jul 4, 2022
Closes square#46. Fixes square#47. Prior to this commit the gem failed to validate the RRULE's syntax: * If a keyword was misspelled, it would *silently* be ignored * If a keyword appeared multiple times only the last occurance was used * If the mutually exclusive keywords COUNT and UNTIL were used together then no exception was raised ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') => #<RRule::Rule:0x000055db33885018 ... > rrule.instance_variable_get(:@options) => {:interval=>1, :wkst=>1, :freq=>"DAILY", :count=>7, :until=>2020-03-02 00:00:00 +0100, ... ``` Therefore we add a validating parser with comprehensive error messages: ```ruby > rrule = RRule.parse('FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9') Traceback (most recent call last): ... RRule::InvalidRRule (SyntaxError) * unknown keyword 'INTERVALLLLL' at position 42: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^^^^^^^^ * keyword 'COUNT' appeared more than once at positions 11 and 19: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ * keywords 'COUNT' and 'UNTIL' are mutually exclusive at positions 11, 19 and 27: 'FREQ=DAILY;COUNT=3;COUNT=7;UNTIL=20200302;INTERVALLLLL=9' ^^^^^ ^^^^^ ^^^^^ ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the document, 5545 obsoletes 2445 since 2009.
The README.md states that,
I stumble upon this while trying to use this gem (RFC2445) with rrule in javascript (RFC5545).
I am not familiar with the RFC5545 or RFC2445.
The text was updated successfully, but these errors were encountered: