governance.Instanttypeno test imports ittype Instant = Brand<string, "plan instant">;A time in UTC to the second, YYYY-MM-DDTHH:MM:SSZ. Made only by parseInstant or instantOfMs.
The time of an event and the day a deferral ends, as branded text made only by a parser: an instant is YYYY-MM-DDTHH:MM:SSZ in UTC to the second (0037-planning FR-003) and a day is YYYY-MM-DD; each is a real date, and each sorts as text in the order of time. Nothing here reads a clock: a time is a value the caller passes in (FR-022).
import { parseInstant } from "./time.ts";
parseInstant("2026-11-21T10:00:00Z"); // { kind: "ok", value: "2026-11-21T10:00:00Z" }
parseInstant("2026-02-30T10:00:00Z"); // { kind: "err", error: ... }governance.Instanttypeno test imports ittype Instant = Brand<string, "plan instant">;A time in UTC to the second, YYYY-MM-DDTHH:MM:SSZ. Made only by parseInstant or instantOfMs.
governance.Daytypeno test imports ittype Day = Brand<string, "plan day">;A calendar day, YYYY-MM-DD. Made only by parseDay.
governance.TimeProblemtypeno test imports ittype TimeProblem = { readonly kind: "bad-time"; readonly text: string; readonly expected: string };A text that is not an instant or a day.
governance.parseInstantfunctionno test imports itfunction parseInstant(text: string): Result<Instant, TimeProblem>An instant from text, or why it is not one: the form, and a date that exists.
governance.instantOfMsfunctionno test imports itfunction instantOfMs(ms: number): Result<Instant, TimeProblem>The instant of a time in milliseconds since 1970, cut to the second.
governance.msOfInstantfunctionno test imports itfunction msOfInstant(instant: Instant): numberThe milliseconds since 1970 of an instant.
governance.parseDayfunctionno test imports itfunction parseDay(text: string): Result<Day, TimeProblem>A day from text, or why it is not one.
Instanttypeno test imports ittype Instant = Brand<string, "plan instant">;A time in UTC to the second, YYYY-MM-DDTHH:MM:SSZ. Made only by parseInstant or instantOfMs.
Daytypeno test imports ittype Day = Brand<string, "plan day">;A calendar day, YYYY-MM-DD. Made only by parseDay.
TimeProblemtypeno test imports ittype TimeProblem = { readonly kind: "bad-time"; readonly text: string; readonly expected: string };A text that is not an instant or a day.
parseInstantfunctionno test imports itfunction parseInstant(text: string): Result<Instant, TimeProblem>An instant from text, or why it is not one: the form, and a date that exists.
instantOfMsfunctionno test imports itfunction instantOfMs(ms: number): Result<Instant, TimeProblem>The instant of a time in milliseconds since 1970, cut to the second.
msOfInstantfunctionno test imports itfunction msOfInstant(instant: Instant): numberThe milliseconds since 1970 of an instant.
parseDayfunctionno test imports itfunction parseDay(text: string): Result<Day, TimeProblem>A day from text, or why it is not one.