-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Description
The fact that the NaiveWeek Eq trait is derived and not manually implemented leads to inaccuracies when comparing weeks. For example:
A = NaiveWeek {date: 03-04-2025, start: Monday}
and B = NaiveWeek {date: 04-04-2025, start: Monday}
(In format day-month-year).
A and B are technically the same week. But when comparing it with the derived Eq trait, it will return false, as their dates are not equal.
A manual implementation of Eq, such as comparing the first day of each week A.first_day() == B.first_day()
or something similar would resolve this issue and make week comparisons accurate.
This improvement would significantly enhance the reliability of this data type.
Metadata
Metadata
Assignees
Labels
No labels