[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Type](https://evolu.dev/docs/api-reference/common/Type) › DateIso

```ts
const DateIso:  brand(
  "DateIso",
  String,
  (value) =>
    value.length === 24 && new globalThis.Date(value).toJSON() === value
      ? ok()
      : err<DateIsoError>({ type: "DateIso", value }),
  (error) =>
    The value ${safelyStringifyUnknownValue(error.value)} is not a canonical ISO date-time string.,
) ;
```

Defined in: [packages/common/src/Type.ts:5009](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Type.ts#L5009)

Canonical ISO date-time [String](https://evolu.dev/docs/api-reference/common/Type/variables/String).

Uses the `YYYY-MM-DDTHH:mm:ss.sssZ` format. Date-only strings, timezone
offsets, and extended-year forms are rejected. The fixed-width UTC form sorts
chronologically as text, which is useful for SQLite and other stores without
a dedicated date-time representation.

Valid values range from `"0000-01-01T00:00:00.000Z"` through
`"9999-12-31T23:59:59.999Z"`.

### Example

```ts
import {
  assertEqual,
  assertErr,
  assertOk,
  assertType,
  Data,
  DateIso,
} from "@evolu/common";

const value = "2023-01-01T12:00:00.000Z";
assertOk(DateIso.fromUnknown(value), value);
const invalid = DateIso.fromUnknown("2023-01-01");
assertErr(invalid);
assertType(Data, invalid.error);
assertEqual(invalid.error, {
  type: "DateIso",
  value: "2023-01-01",
});
```