parseAsInstant
const parseAsInstant: Parser<Temporal.Instant>;Defined in: tanstack/temporal.ts:54
A precise moment on the global timeline — ISO-8601 UTC (2026-06-18T16:00:00Z).
An input with an offset is accepted and normalized to UTC; one without an
offset or Z parses to null.
Example
Section titled “Example”import { useQueryState } from "@xtandard/lib/tanstack";import { parseAsInstant } from "@xtandard/lib/tanstack/temporal";
parseAsInstant.parse("2026-06-18T09:00:00-07:00")?.toString(); // → "2026-06-18T16:00:00Z"parseAsInstant.parse("2026-06-18"); // → null (no offset)
const [at, setAt] = useQueryState("at", parseAsInstant);