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

Non-Gregorian Recurrence Rules #87

Open
matejsvajger opened this issue Apr 1, 2016 · 1 comment
Open

Non-Gregorian Recurrence Rules #87

matejsvajger opened this issue Apr 1, 2016 · 1 comment
Assignees
Milestone

Comments

@matejsvajger
Copy link

Hi there!

Out of all three main opensource php libraries that are handling RRULES this is the only one that tries to address the problem with occurrences on non existing dates.

For example, if my birthday is on 29th of February, then my birthday will show up on calendar every four years.

I see you're trying to handle this through ArrayTransformerConfig with enableLastDayOfMonthFix();

I know the rfc5545 explicitly states such occurences should be skipped, however there is an update to it since last year which address exactly this problem with introduction of SKIP property.

Here's a more common and real world example than the brithday on 29.02. where this comes handy:

Imagine you want to schedule a subscription credit card payment monthly but you can make it only on weekdays. The initial payment for subscription is made on Thursday 31st of March 2016. The next occurrence would fall on 31.04.2016 which obviously doesn't exist. Now using the enableLastDayOfMonthFix would fix this and set the date on 30.04.2016 but this day falls on Saturday. Moving to the first day of next month also falls on weekend.

A simple rule like this: FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;SKIP=FORWARD would move the occurrence to the next working day on 2.5.2016.

My question is; are there any plans on implementing this behavior?

@simshaun
Copy link
Owner

I had no plans for it, but I'll add this to my list of things to check out when I get around to refactoring this library.

@simshaun simshaun added this to the 2.0 milestone May 31, 2016
@simshaun simshaun self-assigned this May 31, 2016
@simshaun simshaun mentioned this issue Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants