Skip to content

chore: simplify DateLib types #2735

Merged
gpbl merged 4 commits intomainfrom
gpbl/simplify-types-datelib
Apr 26, 2025
Merged

chore: simplify DateLib types #2735
gpbl merged 4 commits intomainfrom
gpbl/simplify-types-datelib

Conversation

@gpbl
Copy link
Copy Markdown
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 Copilot and rodgobbi April 12, 2025 23:28
@gpbl gpbl marked this pull request as ready for review April 12, 2025 23:28

This comment was marked as resolved.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Giampaolo Bellavite <gpbellavite@icloud.com>
@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.

2 participants