The day of the month. Should be an integer between 1 and 31.
The month of the year. Should be an integer between 1 and 12.
Optional
year: numberThe year of the date. Optional parameter. If provided, should be a positive integer.
Will throw an error if the provided day, month, and optional year do not form a valid date.
assertValidDateDay(31, 2, 2020);;
//=> Error: Invalid day of the month: 31.
assertValidDateDay(29, 2, 2020);;
//=> no error
Generated using TypeDoc
Asserts that the provided day, month, and optional year form a valid date. If the date is not valid, it throws an error.