Skip to content

DateString

Date-time combinations are represented by strings that conform to ISO 8601, as emitted by JavaScript's Date.toJSON().

All dates and times are expressed/interpreted in UTC, unless another time zone offset is specified.

If calendar date is specified, but the time component is omitted, the time may be approximated as the first second of that day.

Format

The format of a dateString is "YYYY-MM-DDThh:mm:SS.sssZ"

CharactersDescriptionRange
YYYY Four-digit Gregorian calendar year, e.g. 0001 for year 1 AD 1583 - 9999
MM Two-digit, zero-padded month of the year 01 - 12
DD Two-digit, zero-padded day of the month 01 - 31
T Literal T, indicating start of the time block
hhTwo-digit, zero-padded hour of the day 00 - 23
mmTwo-digit, zero-padded minute of the hour 00 - 59
SSTwo-digit, zero-padded second of the minute 00 - 59
sssThree-digit-precision subsecond 000 - 999
Z Literal Z, indicating zero time offset from UTC

Examples

  • "2022-08-19T14:57:20.000Z"
  • "2022-08-19T14:58:20.000-05:00"
  • "2022-08-19"