# regex

Industry: Core

## [calendar-date](/gmt/reference/regex/calendar-date/)

- [`calendarDate`](/gmt/reference/regex/calendar-date/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.

## [calendar-zoned-date-time](/gmt/reference/regex/calendar-zoned-date-time/)

- [`calendarZonedDateTime`](/gmt/reference/regex/calendar-zoned-date-time/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):

## [date](/gmt/reference/regex/date/)

- [`day`](/gmt/reference/regex/date/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`](/gmt/reference/regex/date/month/): RegExp matching an ISO 8601 month: `01`–`12`.
- [`plainDate`](/gmt/reference/regex/date/plainDate/): RegExp matching ISO 8601 calendar date (extended): `YYYY-MM-DD` or `±YYYYYY-MM-DD`.
- [`year`](/gmt/reference/regex/date/year/): RegExp matching the shape of an ISO 8601 year: 4 digits, or a sign and 6 digits (Temporal's `DateYear`).

## [date-time](/gmt/reference/regex/date-time/)

- [`plainDateTime`](/gmt/reference/regex/date-time/plainDateTime/): RegExp matching ISO 8601 local date-time (extended): `<date>T<time>`.

## [epcis](/gmt/reference/regex/epcis/)

- [`epcisEventTime`](/gmt/reference/regex/epcis/epcisEventTime/): RegExp matching a GS1 EPCIS 2.0 `eventTime` (and `recordTime`): the `DateTimeStamp` pattern of the EPCIS XSD (https://ref.gs1.org/standards/epcis/epcglobal-epcis-2_0.xsd, a normative artefact of EPCIS 2.0 / ISO/IEC 19987), verbatim and anchored.
- [`epcisTimeZoneOffset`](/gmt/reference/regex/epcis/epcisTimeZoneOffset/): RegExp matching a GS1 EPCIS 2.0 `eventTimeZoneOffset`: the `pattern` the EPCIS JSON schema (https://ref.gs1.org/standards/epcis/epcis-json-schema.json, a normative artefact of EPCIS 2.0 / ISO/IEC 19987) gives for the field, verbatim: `^([+]|[-])((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$`.

## [fhir](/gmt/reference/regex/fhir/)

- [`fhirDate`](/gmt/reference/regex/fhir/fhirDate/): RegExp matching a FHIR R4 `date`: the `regex` of the `date` StructureDefinition (https://hl7.org/fhir/R4/date.profile.json), verbatim and anchored.
- [`fhirDateTime`](/gmt/reference/regex/fhir/fhirDateTime/): RegExp matching a FHIR R4 `dateTime`: the `regex` of the `dateTime` StructureDefinition (https://hl7.org/fhir/R4/datetime.profile.json), verbatim and anchored.
- [`fhirInstant`](/gmt/reference/regex/fhir/fhirInstant/): RegExp matching a FHIR R4 `instant`: the `regex` of the `instant` StructureDefinition (https://hl7.org/fhir/R4/instant.profile.json), verbatim and anchored.

## [http-date](/gmt/reference/regex/http-date/)

- [`httpDate`](/gmt/reference/regex/http-date/httpDate/): RegExp matching RFC 9110 §5.6.7 IMF-fixdate — the only form GMT's `formatHttpDate` emits and the preferred HTTP-date form.

## [leap-second](/gmt/reference/regex/leap-second/)

- [`instantLeapSecond`](/gmt/reference/regex/leap-second/instantLeapSecond/): RegExp fragment matching an ISO 8601 leap second in every shape `Temporal.Instant.from` accepts.
- [`leapSecond`](/gmt/reference/regex/leap-second/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.

## [month-day](/gmt/reference/regex/month-day/)

- [`plainMonthDay`](/gmt/reference/regex/month-day/plainMonthDay/): RegExp matching an ISO 8601 month-day (extended): `--MM-DD` or `MM-DD`.

## [nanoseconds](/gmt/reference/regex/nanoseconds/)

- [`nanosecondDecimal`](/gmt/reference/regex/nanoseconds/nanosecondDecimal/): RegExp matching the canonical decimal form of a nanosecond timestamp — the shape `formatNanoseconds` emits and `parseNanoseconds` accepts.

## [rfc-2822](/gmt/reference/regex/rfc-2822/)

- [`rfc2822DateTime`](/gmt/reference/regex/rfc-2822/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.

## [rfc-3339](/gmt/reference/regex/rfc-3339/)

- [`rfc3339DateTime`](/gmt/reference/regex/rfc-3339/rfc3339DateTime/): RegExp matching an RFC 3339 §5.6 date-time: ISO 8601 with a mandatory offset (`Z` or `±HH:MM`).

## [sql-date-time](/gmt/reference/regex/sql-date-time/)

- [`sqlDateTime`](/gmt/reference/regex/sql-date-time/sqlDateTime/): RegExp matching a SQL timestamp literal without a time zone: `YYYY-MM-DD HH:MM:SS[.fffffffff]`.

## [sql-offset-date-time](/gmt/reference/regex/sql-offset-date-time/)

- [`sqlOffsetDateTime`](/gmt/reference/regex/sql-offset-date-time/sqlOffsetDateTime/): RegExp matching a SQL timestamp literal with a time zone offset: `YYYY-MM-DD HH:MM:SS[.fffffffff][ ]±HH[:MM[:SS]]`.

## [time](/gmt/reference/regex/time/)

- [`fractionalSecond`](/gmt/reference/regex/time/fractionalSecond/): RegExp matching 1–9 fractional-second digits (nanosecond precision).
- [`hour`](/gmt/reference/regex/time/hour/): RegExp matching an ISO 8601 hour in extended format: `00`–`23`.
- [`millisecond`](/gmt/reference/regex/time/millisecond/): Backward-compatible alias for `fractionalSecond`.
- [`minute`](/gmt/reference/regex/time/minute/): RegExp matching an ISO 8601 minute: `00`–`59`.
- [`plainTime`](/gmt/reference/regex/time/plainTime/): RegExp matching ISO 8601 local time (extended): `HH:mm[:ss[.fffffffff]]`.
- [`second`](/gmt/reference/regex/time/second/): RegExp matching a second of `00`–`59`.

## [time-zone-like](/gmt/reference/regex/time-zone-like/)

- [`timeZoneLike`](/gmt/reference/regex/time-zone-like/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`.

## [unix](/gmt/reference/regex/unix/)

- [`unixMilliseconds`](/gmt/reference/regex/unix/unixMilliseconds/): RegExp matching a Unix timestamp in milliseconds: exactly 13 digits.
- [`unixSeconds`](/gmt/reference/regex/unix/unixSeconds/): RegExp matching a Unix timestamp in seconds: exactly 10 digits.

## [utc-date-time](/gmt/reference/regex/utc-date-time/)

- [`utcDateTime`](/gmt/reference/regex/utc-date-time/utcDateTime/): RegExp matching ISO 8601 UTC datetime: `<date>T<time>Z` with optional fractional seconds, in ISO 8601 extended format.

## [utc-offset](/gmt/reference/regex/utc-offset/)

- [`utcOffset`](/gmt/reference/regex/utc-offset/utcOffset/): RegExp matching an ISO 8601 UTC offset in the extended form GMT's offset-instant pair stores: `±HH:MM`, optionally `±HH:MM:SS`.

## [year-month](/gmt/reference/regex/year-month/)

- [`plainYearMonth`](/gmt/reference/regex/year-month/plainYearMonth/): RegExp matching an ISO 8601 year-month in the extended form: `YYYY-MM` or `±YYYYYY-MM`.
