{ "_comment": "Single source of truth for the honest date-label rule set shared by the TS formatDocumentDate (frontend/src/lib/shared/utils/documentDate.ts) and the Java formatTitleDate (backend importing/DocumentTitleFormatter.java). Both test suites assert against THIS table so the two implementations cannot drift (en-dash vs hyphen, 'ca.' vs 'circa', season words, range collapse). Expected labels are the GERMAN (de) canonical form: import titles are always German, and the TS formatter defaults to the de locale. Do not edit one side's expectation without editing this file and both tests. See issue #666 and the Markus/Sara drift-guard decision.", "cases": [ { "name": "DAY renders a full long date", "precision": "DAY", "anchor": "1943-12-24", "end": null, "raw": null, "expected": "24. Dezember 1943" }, { "name": "MONTH renders month and year only — never a fabricated day", "precision": "MONTH", "anchor": "1916-06-01", "end": null, "raw": "Juni 1916", "expected": "Juni 1916" }, { "name": "SEASON renders the season word from raw", "precision": "SEASON", "anchor": "1916-06-01", "end": null, "raw": "Sommer 1916", "expected": "Sommer 1916" }, { "name": "SEASON with null raw derives the season from the anchor month", "precision": "SEASON", "anchor": "1916-04-01", "end": null, "raw": null, "expected": "Frühling 1916" }, { "name": "YEAR renders the year only — suppresses month and day", "precision": "YEAR", "anchor": "1916-06-15", "end": null, "raw": null, "expected": "1916" }, { "name": "APPROX renders a ca. prefix before the year", "precision": "APPROX", "anchor": "1920-01-01", "end": null, "raw": null, "expected": "ca. 1920" }, { "name": "RANGE in the same month collapses the shared month and year", "precision": "RANGE", "anchor": "1917-01-10", "end": "1917-01-11", "raw": null, "expected": "10.–11. Jan. 1917" }, { "name": "RANGE across months expands both months, sharing the year", "precision": "RANGE", "anchor": "1917-01-30", "end": "1917-02-02", "raw": null, "expected": "30. Jan. – 2. Feb. 1917" }, { "name": "RANGE across a year boundary expands both full dates", "precision": "RANGE", "anchor": "1916-12-30", "end": "1917-01-02", "raw": null, "expected": "30. Dez. 1916 – 2. Jan. 1917" }, { "name": "RANGE where end equals start collapses to a single day", "precision": "RANGE", "anchor": "1917-01-10", "end": "1917-01-10", "raw": null, "expected": "10. Jan. 1917" }, { "name": "RANGE with a null end renders an open-range indicator, never a fabricated end", "precision": "RANGE", "anchor": "1917-01-10", "end": null, "raw": null, "expected": "ab 10. Jan. 1917" }, { "name": "UNKNOWN renders the unknown label regardless of anchor", "precision": "UNKNOWN", "anchor": null, "end": null, "raw": "?", "expected": "Datum unbekannt" } ] }