Timeline: shared precision-aware date-label helper (#778) #824

Merged
marcel merged 6 commits from feat/778-timeline-date-label into main 2026-06-13 14:04:56 +02:00
Showing only changes of commit 6d81471294 - Show all commits

View File

@@ -4,6 +4,13 @@ import { m } from '$lib/paraglide/messages.js';
/**
* Precision of a document's date — mirrors the backend {@code DatePrecision} enum
* and the import normalizer's seven values verbatim.
*
* DRIFT RISK: this is a hand-maintained mirror of the Java {@code DatePrecision}
* enum, NOT an OpenAPI-generated type. It must be updated manually whenever the
* Java enum changes, and must NOT be migrated to the generated API type — the
* generated enum is request/response-shaped, while this drives the shared
* client-side formatter (used by both documents and the timeline façade). Keep
* the two in lockstep by hand.
*/
export type DatePrecision = 'DAY' | 'MONTH' | 'SEASON' | 'YEAR' | 'RANGE' | 'APPROX' | 'UNKNOWN';