Validate a complete CalendarDateTime object
Performs comprehensive validation on all components of a calendar date/time. Returns detailed error messages for any invalid components.
CalendarDateTime object to validate
ValidationResult with valid flag and array of error messages
validateCalendarDateTime({ year: 2024, month: 2, day: 29, hour: 12, minute: 30, second: 45})// { valid: true, errors: [] } Copy
validateCalendarDateTime({ year: 2024, month: 2, day: 29, hour: 12, minute: 30, second: 45})// { valid: true, errors: [] }
validateCalendarDateTime({ year: 2023, month: 2, day: 29, hour: 25, minute: 30, second: 45})// {// valid: false,// errors: [// 'Invalid day: February 29 doesn't exist in 2023',// 'Hour must be between 0 and 23, got 25'// ]// } Copy
validateCalendarDateTime({ year: 2023, month: 2, day: 29, hour: 25, minute: 30, second: 45})// {// valid: false,// errors: [// 'Invalid day: February 29 doesn't exist in 2023',// 'Hour must be between 0 and 23, got 25'// ]// }
Validate a complete CalendarDateTime object
Performs comprehensive validation on all components of a calendar date/time. Returns detailed error messages for any invalid components.