Closed vil02 closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.91%. Comparing base (
83b4dd8
) to head (3368c0d
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
CheckDayAndMonth
should ideally compute how many days a month has (based on the year) and check against that (you don't need to do this though).
A function like ParseSimpleDate
could be used both in DateToDay
and DateDayDifference
(i.e. the input would be a string "24/03/2024"
and the output would be some kind of tuple with day, month and year). It should also check if the resulting date is correct (including correct number of days for given month). I was planning to spend some time on it after this and #1628 are merged.
Describe your change:
Currently
DateDayDifference('29/02/2024', '04/03/2024')
gives5
. This PR fixes that. Further more:the errors now are thrown,
the tests are reorganized; edited test cases were verified with the page linked in the docs,
some minor refactoring was done.
[ ] Add an algorithm?
[x] Fix a bug or typo in an existing algorithm?
[ ] Documentation change?
Checklist:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.