Skip to content

regex

  • calendarDate: RegExp matching a calendar-annotated PlainDate string in the RFC 9557 form Temporal writes and reads: the ISO 8601 date, then one [u-ca=<id>] calendar annotation.
  • calendarZonedDateTime: RegExp matching a calendar-annotated ZonedDateTime string in the RFC 9557 form Temporal writes and reads — the zoned sibling of calendarDate (regex/calendar-date.ts):
  • day: RegExp matching an ISO 8601 day of the month: 01–31 (shape only; whether the day exists in its month is checked by Temporal.PlainDate.from in isValidDate).
  • month: RegExp matching an ISO 8601 month: 01–12.
  • plainDate: RegExp matching ISO 8601 calendar date (extended): YYYY-MM-DD or ±YYYYYY-MM-DD.
  • year: RegExp matching the shape of an ISO 8601 year: 4 digits, or a sign and 6 digits (Temporal’s DateYear).
  • plainDateTime: RegExp matching ISO 8601 local date-time (extended): <date>T<time>.
  • httpDate: RegExp matching RFC 9110 §5.6.7 IMF-fixdate — the only form GMT’s formatHttpDate emits and the preferred HTTP-date form.
  • instantLeapSecond: RegExp fragment matching an ISO 8601 leap second in every shape Temporal.Instant.from accepts.
  • leapSecond: RegExp fragment matching an ISO 8601 leap second (second 60) in the time of day of a date-time or time string, in every spelling Temporal’s PlainDateTime.from/PlainTime.from grammar parses.
  • nanosecondDecimal: RegExp matching the canonical decimal form of a nanosecond timestamp — the shape formatNanoseconds emits and parseNanoseconds accepts.
  • rfc2822DateTime: RegExp matching the strict shape of an RFC 5322 §3.3 date-time (obsoletes RFC 2822): the single-space, case-exact form a generator writes.
  • rfc3339DateTime: RegExp matching an RFC 3339 §5.6 date-time: ISO 8601 with a mandatory offset (Z or ±HH:MM).
  • sqlDateTime: RegExp matching a SQL timestamp literal without a time zone: YYYY-MM-DD HH:MM:SS[.fffffffff].
  • fractionalSecond: RegExp matching 1–9 fractional-second digits (nanosecond precision).
  • hour: RegExp matching an ISO 8601 hour in extended format: 00–23.
  • millisecond: Backward-compatible alias for fractionalSecond.
  • minute: RegExp matching an ISO 8601 minute: 00–59.
  • plainTime: RegExp matching ISO 8601 local time (extended): HH:mm[:ss[.fffffffff]].
  • second: RegExp matching a second of 00–59.
  • timeZoneLike: RegExp matching the shape of a time zone identifier: Temporal’s TimeZoneIdentifier grammar (§13.31, the ISO 8601 / RFC 9557 grammar), TimeZoneIdentifier ::: UTCOffset[~SubMinutePrecision] | TimeZoneIANAName.
  • unixMilliseconds: RegExp matching a Unix timestamp in milliseconds: exactly 13 digits.
  • unixSeconds: RegExp matching a Unix timestamp in seconds: exactly 10 digits.
  • utcDateTime: RegExp matching ISO 8601 UTC datetime: <date>T<time>Z with optional fractional seconds, in ISO 8601 extended format.
  • utcOffset: RegExp matching an ISO 8601 UTC offset in the extended form GMT’s offset-instant pair stores: ±HH:MM, optionally ±HH:MM:SS.