Rebuild the RFC5545 string from the RSET arrays
Is there any code available to rebuild the RFC5545 string from the arrays produced from the RSet(
At the moment no, because I don't know how to do it. Basically the RSet object is more flexible than what the RFC allows, so in some cases there is no way to build a RFC-compliant string out of it. More info here: https://github.com/rlanvin/php-rrule/issues/26#issuecomment-303773780
I am open to suggestions!
Sorry to hear that.
Fortunately my use of RFC5545 is quite simple. At most only oneI RRULE, EXDATE and RDATE in any rule.
But unfortunately my experience with PHP is very limited compared to other languages so my attempt may be quite crude.
How might I use the code in rrule->rfcString to do the RRULE part given that I have an RSET array?
The EXDATE and RDATE pieces should be relatively straight forward
Jim
How might I use the code in rrule->rfcString to do the RRULE part given that I have an RSET array?
Well basically you would use $rset->getRRules() to get an array, use foreach to loop and call rfcString() on each ones. However problems will occur once you have multiple RRULE, because this will generate multiple DTSTART segments, which is not allowed by the RFC.