Skip to content
New issue

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

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

Already on GitHub? # to your account

Construct a RSet from RFC string #26

Closed
rlanvin opened this issue Feb 2, 2017 · 4 comments
Closed

Construct a RSet from RFC string #26

rlanvin opened this issue Feb 2, 2017 · 4 comments

Comments

@rlanvin
Copy link
Owner

rlanvin commented Feb 2, 2017

With the Python version (python dateutils), it is possible to parse a RFC string with multiple RRULE lines (or RDATE, EXDATE, EXRULE) directly into a RSet. That could be interesting to have as well.

This will require some refactoring of RRule::parseRfcString() to make it a factory method, or coding an actual factory method on top of it.

The constructor would still only return a RRule since it is probably not possible and not advisable to have the constructor returns a different object.

A RSet should also be able to be formatted into a RFC String with multiple lines.

If this is a feature that would be useful, leave a 👍

rlanvin added a commit that referenced this issue Apr 11, 2017
Add the possibility to construct a RSet from a string
Ref #26
@rlanvin
Copy link
Owner Author

rlanvin commented May 7, 2017

Done.

@rlanvin rlanvin closed this as completed May 7, 2017
@coffeduong
Copy link

Is there any way to refactor RSet back to RFC string?

@rlanvin
Copy link
Owner Author

rlanvin commented May 24, 2017

At the moment no. The problem is that, according to the RFC, there can be only one DTSTART property for the entire set. However, a RSet object in this library is more flexible and allow combining multiple RRULE, each with a different DTSTART property. This cannot be expressed in a RFC-compliant way. So I don't know how to handle these cases. I'm open to suggestions.

@coffeduong
Copy link

Ok, I'll try. If there is any new idea, I'll ping you back

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants