Timeline: shared precision-aware date-label helper (#778) #824
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user