Skip to content

Commit

Permalink
Add test cases and fix YEARLY with BYMONTH BYDAY on summer-time trans…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
phil-davis committed May 30, 2024
1 parent 9039f90 commit 1d0d0bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Recur/RRuleIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ protected function nextYearly(): void
(int) $currentYear,
(int) $currentMonth,
(int) $occurrence
);
)->modify($this->startTime());

return;
} else {
Expand Down
25 changes: 25 additions & 0 deletions tests/VObject/Recur/RRuleIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,31 @@ public function testYearlyByMonthByDay(): void
);
}

public function testYearlyByMonthByDayOnDstTransition(): void
{
$this->parse(
'FREQ=YEARLY;COUNT=13;INTERVAL=2;BYMONTH=3;BYDAY=SU',
'2021-03-07 02:30:00',
[
'2021-03-07 02:30:00',
'2021-03-14 02:30:00',
'2021-03-21 02:30:00',
'2021-03-28 03:30:00',
'2023-03-05 02:30:00',
'2023-03-12 02:30:00',
'2023-03-19 02:30:00',
'2023-03-26 03:30:00',
'2025-03-02 02:30:00',
'2025-03-09 02:30:00',
'2025-03-16 02:30:00',
'2025-03-23 02:30:00',
'2025-03-30 03:30:00',
],
null,
'Europe/Zurich',
);
}

public function testYearlyNewYearsDay(): void
{
$this->parse(
Expand Down

0 comments on commit 1d0d0bd

Please sign in to comment.