We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d1a49b commit a6ede4aCopy full SHA for a6ede4a
src/infrastructure/gateway/utils.ts
@@ -35,9 +35,8 @@ const zeroPadNumber = (input: string = ""): string => {
35
const isDateValid = (date: string): boolean => {
36
const [year, month, day] = date.split("-");
37
38
- // Check length constraints and numeric validity
39
- const isDayInvalid = day.length === 0 || day.length > 2 || isNaN(parseInt(day));
40
- const isMonthInvalid = month.length === 0 || month.length > 2 || isNaN(parseInt(month));
+ const isDayInvalid = day.length > 2 || isNaN(parseInt(day));
+ const isMonthInvalid = month.length > 2 || isNaN(parseInt(month));
41
const isYearInvalid = year.length !== 4 || isNaN(parseInt(year));
42
43
if (isDayInvalid || isMonthInvalid || isYearInvalid) {
0 commit comments