-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
DateMask: Fix leap year February logic 02/29 #10377
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
DateMask: Fix leap year February logic 02/29 #10377
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #10377 +/- ##
==========================================
+ Coverage 91.43% 91.49% +0.06%
==========================================
Files 418 418
Lines 13226 13222 -4
Branches 2538 2536 -2
==========================================
+ Hits 12093 12098 +5
+ Misses 554 549 -5
+ Partials 579 575 -4 ☔ View full report in Codecov by Sentry. |
0eb9629 to
d41e61a
Compare
| return -1; | ||
| return 0; | ||
| if (int.TryParse(yearString, out var y)) | ||
| return (DateTime.Today.Year / 100 * 100) + y; // this code will still work in 2100 until 2900. I guess in a thousand years we'll have to update this line ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL
|
Thanks @charles7668 , I see you are on a fixing spree ;) |
Description
Close #9855
How Has This Been Tested?
Add test case in
DataMaskTests.DataMask2Type of Changes
Checklist
dev).