Skip to content
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

Suggestion: add support to humanize ical rrule #203

Open
ecornely opened this issue Sep 12, 2024 · 3 comments
Open

Suggestion: add support to humanize ical rrule #203

ecornely opened this issue Sep 12, 2024 · 3 comments

Comments

@ecornely
Copy link

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.

@hugovk
Copy link
Member

hugovk commented Sep 12, 2024

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?

@ecornely
Copy link
Author

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.

@hugovk
Copy link
Member

hugovk commented Sep 12, 2024

Here's a blog post on "The Deceptively Complex World of RRULEs in Calendar Events":

Which links to the spec in RFC 2445:

For comparison, here's a Go library to humanise RRULEs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants