-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Q: How can I check for invalid combination of a year-month-day ?!
when I create a new date with invalid month or day it is transformed to another valid date :
const birthDate = new DateObject({
year: 1942,
month: 84,
day: 55
})
console.log(birthDate.format('YYYY-MM-DD'), birthDate.isValid) //1949-01-24 true
(expected: 1942-84-55, false)
Metadata
Metadata
Assignees
Labels
No labels