-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
During testing it was discovered that the generic date incorrect error was showing for seemingly correct dates. The current implementation makes use of an Integer check to ascertain whether the input is a correct digit. Nonetheless, Integer will interpret input such as "0_" as octal rather than decimal, so values like "08" or "09" will error. We conmfirmed with manual tests that this was the case and added some more validation test coverage. The fix is to drop any leading 0s from the string before applying Integer(), with the caveat that "00" should still be passed as 0. A regex was introduced to do this.
- Loading branch information
1 parent
1a4c0e6
commit cd328f6
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters