Celestine API Documentation - v0.2.0
    Preparing search index...

    Function validateCalendarDateTime

    • Validate a complete CalendarDateTime object

      Performs comprehensive validation on all components of a calendar date/time. Returns detailed error messages for any invalid components.

      Parameters

      Returns time.ValidationResult

      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: [] }
      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'
      // ]
      // }