Contract schemas carry timestamps and dates as ISO 8601 strings and parse them to Temporal where code compares or computes.
The repo standard sends timestamps as ISO 8601 strings and has the domain schema transform them to Temporal.Instant, so services work with Temporal values. CentraKit's contract schemas are Zod schemas shared by the API, the MCP server, the generated OpenAPI document and the SaaS forms. A transform would change their output type from string to Temporal.Instant, which next-openapi-gen cannot describe, Server Components cannot pass to Client Components, and structuredContent cannot carry.
Contract schemas keep timestamps as z.iso.datetime({ offset: true }) strings and calendar days as YYYY-MM-DD strings. Code that compares, sorts or computes parses them at that point with the helpers in @workspace/foundation/temporal (parseInstant, parsePlainDate, addIsoDays) and compares with Temporal.Instant.compare or Temporal.PlainDate.compare. Date stays out of contract and service code, as the standard says, except where a third-party API demands one.
Last updated on