refactor(date): consolidate formatDate in date.ts with optional format param

Add format?: 'short'|'long' (default 'long') to date.ts formatDate and
remove the duplicate from personFormat.ts. Update DocumentTopBar to
import from date.ts directly. Move the formatDate tests from
personFormat.spec to date.spec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-15 13:10:44 +02:00
parent 76d6f234b4
commit 8be876492c
5 changed files with 35 additions and 21 deletions

View File

@@ -4,10 +4,10 @@ import {
abbreviateName,
formatXsMeta,
personAvatarColor,
formatDate,
statusDotClass,
statusLabel
} from './personFormat';
import { formatDate } from './date';
// ─── getInitials ─────────────────────────────────────────────────────────────