Skip to content

Update model to use consistent Recurrence object#21

Draft
Samffy wants to merge 2 commits intomasterfrom
refactor
Draft

Update model to use consistent Recurrence object#21
Samffy wants to merge 2 commits intomasterfrom
refactor

Conversation

@Samffy
Copy link
Owner

@Samffy Samffy commented Jun 10, 2023

Add some consistency to Recurrence object.

Before

$recurrence = (new Recurrence())
    ->setFrequency(new Frequency('MONTHLY'))
    ->setPeriodStartAt(new \Datetime('2017-01-01'))
    ->setPeriodEndAt(new \Datetime('2017-12-31'))
    ->setInterval(1);

After

$recurrence = new Recurrence(
    new Frequency(Frequency::FREQUENCY_MONTHLY),
    $interval,
    $periodStartAt,
    $periodEndAt,
    $count,
    $constraints
);

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

Successfully merging this pull request may close these issues.

1 participant

Comments