humanize
humanize copied to clipboard
Suggestion: add support to humanize ical rrule
Hello,
Thanks for that wonderful library.
In a project, I'll probably need to humanize some recurrence rules.
I don't know yet if I'll have to code it, but I thought it would definitely could be part of what this lib is able to do. I'm more a Java developer than python and I don't know how you could not introduce new dependencies to keep this lib lightweight or create an optional sub-module or whatever but I really think it could be a nice added feature.
Thanks for the suggestion. My first impression is it might be out of scope, but please could you give some examples of input and expected output?
Something like that: FREQ=DAILY => Repeats everyday FREQ=MONTHLY;BYMONTHDAY=1 => Repeats on the first day of every month FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=17 => Repeats on March 17th of every year FREQ=WEEKLY;INTERVAL=2;BYDAY=SU,TH => Repeats every other week on Sundays and Thursdays FREQ=MONTHLY;BYDAY=3WE => Repeats on the third Wednesday of every month
Though I don't know if it has to always starts with Repeats or build the description in a different way. That might even be some options to generate in different "sentences"
And this if course in different languages.
Here's a blog post on "The Deceptively Complex World of RRULEs in Calendar Events":
- https://www.nylas.com/blog/calendar-events-rrules/
Which links to the spec in RFC 2445:
- https://datatracker.ietf.org/doc/html/rfc2445#section-4.8.5.4
For comparison, here's a Go library to humanise RRULEs:
- https://github.com/skillcoder/hrrule-go