Skip to content

Conversation

@hristost
Copy link
Contributor

This change makes a fix to Calendar.RecurrenceRule with regards to leap months and adds a few tests to verify correctness. When constructing the base sequence, we include isLeapMonth of the start date in the date components. Before, start dates falling on a leap month would have been treated the same as dates which do fall on the non-leap month before.

This change makes a fix to `Calendar.RecurrenceRule` with regards to leap months
and adds a few tests to verify correctness. When constructing the base sequence,
we include `isLeapMonth` of the start date in the date components. Before, start
dates falling on a leap month would have been treated the same as dates which do
fall on the non-leap month before.
@hristost
Copy link
Contributor Author

@swift-ci please run

Date(timeIntervalSince1970: 1730712000.0), // 2024-11-04T01:20:00-0800
]
XCTAssertEqual(results, expectedResults)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some unrelated whitespace changes here, these would have happened in one commit or another.

@hristost
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@hristost
Copy link
Contributor Author

@swift-ci please test

@hristost hristost merged commit a92bc21 into main Nov 1, 2024
3 checks passed
@hristost hristost deleted the hs/recurrence-rule-leap-month-fixes branch November 1, 2024 05:50
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
This change makes a fix to `Calendar.RecurrenceRule` with regards to leap months
and adds a few tests to verify correctness. When constructing the base sequence,
we include `isLeapMonth` of the start date in the date components. Before, start
dates falling on a leap month would have been treated the same as dates which do
fall on the non-leap month before.
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.

3 participants