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

Wrong trasformation to text #112

Open
tasso85 opened this issue Feb 13, 2017 · 4 comments
Open

Wrong trasformation to text #112

tasso85 opened this issue Feb 13, 2017 · 4 comments

Comments

@tasso85
Copy link

tasso85 commented Feb 13, 2017

If I create a new Rule as

new Recurr\Rule('FREQ=YEARLY;INTERVAL=2');

and then transform it using TextTransformer I get

every 2 years on February 13

that is, it seems to use the corrent day as the date part.

Shouldn't it be just "every 2 years" ?

@simshaun
Copy link
Owner

I don't think so. Saying "every 2 years" doesn't tell me exactly when every 2 years.

@tasso85
Copy link
Author

tasso85 commented Feb 14, 2017

Yes, I understand your point.

In this case, it was a generic recurrence rule, which is not meant to directly refer to a specific start date, which will be set later.

Is there a way then to "tell" the TextTransformer to ignore the start date, which has not been set?

@NaWer
Copy link

NaWer commented Oct 3, 2017

I'm having the same issue.

$rule = new \Recurr\Rule('FREQ=YEARLY;INTERVAL=1;');
$textTransformer = new \Recurr\Transformer\TextTransformer();
echo $textTransformer->transform($rule), '<br />'; //  yearly on October 03

$rule = new \Recurr\Rule('FREQ=MONTHLY;INTERVAL=1;');
$textTransformer = new \Recurr\Transformer\TextTransformer();
echo $textTransformer->transform($rule); // monthly

It was like this before (yearly only). Don't know exactly when this behavior change. Or I don't remember correctly.

@NaWer
Copy link

NaWer commented Oct 3, 2017

The commit that change this behavior : a2a518e on #101

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

3 participants