Skip to content

chore: simplify DateLib types #2735

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

Merged
merged 4 commits into from
Apr 26, 2025
Merged

chore: simplify DateLib types #2735

merged 4 commits into from
Apr 26, 2025

Conversation

gpbl
Copy link
Owner

@gpbl gpbl commented Apr 12, 2025

The date-fns library allows initializing dates using numbers or strings (example). However, this behavior can cause issues when overriding the DateLib, such as when working with the Ethiopic calendar.

To address this, I replaced the DateLib definitions with more explicit types, as this feature is not used by DayPicker. This change will allow us to continue working on the Ethiopic DateLib.

(Note: This is a second attempt to address #2655, which was previously reverted to resolve #2723. Since a test for that bug has been added, this change should now be safe. The bug in the first PR was related to the way I was passing the options to some of them)

gpbl added 2 commits April 12, 2025 17:46
Simplifying the DateLib types to allow using the Ethipic date lib. This is a second approach for #2655.
@gpbl gpbl changed the title chore: simplify types for DateLib chore: simplify DateLib types Apr 12, 2025
@gpbl gpbl requested review from rodgobbi and Copilot April 12, 2025 23:28
@gpbl gpbl marked this pull request as ready for review April 12, 2025 23:28
Copilot

This comment was marked as resolved.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Giampaolo Bellavite <[email protected]>
@gpbl gpbl merged commit f24e441 into main Apr 26, 2025
19 checks passed
@gpbl gpbl deleted the gpbl/simplify-types-datelib branch April 26, 2025 17:44
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