Skip to content

zoned/validate

  • hasDaylightSaving: Check whether a timeZone observes daylight saving time at a reference instant.
  • isValidCalendarZonedDateTime: Return true if value is a valid GMT ZonedDateTime string: a bare ISO zoned datetime (“2024-10-03T14:30:45-04:00[America/New_York]”) or an RFC 9557 calendar-annotated one (“2024-10-03T14:30:45-04:00[America/New_York][u-ca=hebrew]”), as Temporal.ZonedDateTime#toString() and convertZonedToCalendar write it.
  • isValidRfc2822DateTime: Return true when value is a real RFC 5322 (RFC 2822) date-time: the date an email Date: header carries, such as Fri, 15 Mar 2024 14:30:00 -0400.
  • isValidRfc3339DateTime: Return true when value is a real RFC 3339 date-time: an ISO 8601 date and time that always states its UTC offset, as Z or ±HH:MM (RFC 3339 §5.6).
  • isValidTimeZone: Validate whether a string is a valid time zone identifier: an IANA name or a UTC offset.
  • isValidZonedDateTime: Validate whether a string is a valid ISO 8601 zoned datetime string.
  • isValidZonedRange: Return true if value1 and value2 form a valid zoned range — both parseable as ISO ZonedDateTime strings and the instant at value1 is <= the instant at value2.