-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add option to set rrule from string #37
Comments
I think we need something that can parse content from an ICS file into the corresponding PHP objects. The idea behind this library is to work with PHP objects rather than plain text. I would prefer a method like |
Yes, something along these lines would be great. |
I've been modified a little bit to allow me to use a string RRULE; In property.php:
change to
and in Event.php
change to
and when you set the RRULE to the event object, just do it:
just make sure your RRULE is already validated. |
Maybe we could use the excellent work of https://github.com/simshaun/recurr ? |
@Ydalb having a library to integrate into this project would be nice. I will check how I can integrate that into this library! |
Just a +1 on this feature request. I actually already have a code base which implements https://github.com/simshaun/recurr's library and I have stored RRULE strings from that. Now I'm trying to add iCal to that and it would be great if I could just take my existing strings and parse them into iCal's ReccuranceRule object. |
I would be nice to have this feature baked in into v2.0 |
@markuspoerschke I need to have rrule (https://icalendar.org/rrule-tool.html) on my Events. Are contributions welcome to bake this cool lib (simshaun/recurr) into this one ? |
I'd like to see this method too. In the meanwhile I have this absurd bit of code in case it's helpful for others.
|
I have all my rrules stored as strings (like
FREQ=WEEKLY;INTERVAL=1;COUNT=30
). I would like to directly pass that string to theEluceo/iCal/Component/Event
.I tried to use
$vEvent->setRecurrenceRule($myRRule);
, but it only accepts aRecurrenceRule
object. TheRecurrenceRule
object, however, has no method to set the rrule from string. So I basically have to parse my stored rrules and then call thesetBy*
methods on theRecurrenceRule
object.I suggest to either
setRecurrenceRule
accept a string as well.setFromString
method toRecurrenceRule
.setRecurrenceRuleString
method to the event class.Thank you for this cool library 😄 💯
The text was updated successfully, but these errors were encountered: