Closed vkiranmaniya closed 5 years ago
I am sorry but I do not understand your question. What is a "WordPress recurrence rule"?
I am sorry but I do not understand your question. What is a "WordPress recurrence rule"?
Wordpress has event manager built in and it manages recurring events by recurrence rules. so my question is, is it possible to parse WordPress rules?
here is the sample json properties commning from wordpress rest api
{ "post_id": "74768", "start": "1552827600", "end": "1552828500", "timezone_name": "Asia/Bangkok", "allday": "0", "instant_event": "1", "recurrence_rules": "FREQ=WEEKLY;WKST=SU;BYday=SU;", "exception_rules": "EXDATE=20191229T000000Z", "recurrence_dates": null, "exception_dates": "20191229T000000Z", }
I see, well it looks like the field recurrence_rules in your JSON is using the correct format, so that shouldn't be any problem.
The start date is apparently a combination of start and timezone_name.
There is also exception_rules, recurrence_dates and exception_dates. For these you will need to create a RSet object to combine them with the rule..
Long story short: yes the library will work, but you will need to do a bit of conversion.
I did it. Thanks for your response.
Is the library capable of parsing and generating occurrences from WordPress recurrence rules? I'm designing a cron to determine active events at the moment to deliver it on the mobile app. My idea is to