API Reference / @evolu/common / Type / DateIsoString
Variable: DateIsoString
const DateIsoString: BrandType<Type<"String", string, string, StringError, string, StringError>, "DateIso", DateIsoStringError, StringError>;
Defined in: packages/common/src/Type.ts:862
ISO 8601 date-time string.
This Type represents a date-time string that follows the ISO 8601 format and is compatible with SQLite, which lacks a native date type and relies on ISO 8601 strings for sorting. Enforcing a 24-character format ensures correct lexicographic ordering.
It must be a valid JavaScript Date string that can be parsed.
Valid range: "0000-01-01T00:00:00.000Z"
to "9999-12-31T23:59:59.999Z"
.
Example
const result = DateIsoString.from("2023-01-01T12:00:00.000Z"); // ok
const error = DateIsoString.from("10000-01-01T00:00:00.000Z"); // err