teambition / rrule-go

Go library for working with recurrence rules for calendar dates.
MIT License
310 stars 57 forks source link

StrToRule doesn't follow RFC5545 #36

Closed ncapdevi closed 4 years ago

ncapdevi commented 4 years ago

According to https://tools.ietf.org/html/rfc5545 A rrule string such as: DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR and is the kind of string returned from the fairly popular library https://github.com/jakubroztocil/rrule with demo here https://jakubroztocil.github.io/rrule/

However, this string won't work for two reasons,

  1. The standardized "RRULE:" Prefix from the RFC doc
  2. The new line \n format to separate the rules.

It seems like the library doesn't fully support the standard, although I may be wrong.

dolmen commented 4 years ago

StrToRRuleSet exists for that purpose.

Here is an example on the Go Playground: https://play.golang.org/p/ZSmwJNUVnWh