AdminDateTime
Corex\Support\DateTime\AdminDateTime · interface · Core layer
How every CoreX admin surface turns a stored instant into something an operator can read. Five presentations and no sixth (spec 076, FR-002). The closed set is the point: before this contract existed, each screen composed its own, and the product ended up showing raw ISO strings on twelve surfaces, the reader’s own browser timezone on six, and three mutually inconsistent server-side formats built from the site’s date/time options. The interface lives beside its callers rather than beside the implementation, per the constitution’s dependency rule — a screen depends on “a way to present a date”, not on wp_date().
Public API
Section titled “Public API”format(int|string|DateTimeImmutable|null $value, string $kind, string $absent): Formatted
Section titled “format(int|string|DateTimeImmutable|null $value, string $kind, string $absent): Formatted”Present an instant, in the site’s timezone and the active locale.
clientConfig(): array
Section titled “clientConfig(): array”The configuration a browser needs to produce identical output. Handed across the one admin config boundary (FR-008). It carries already-translated words — month names, period markers, the connector pattern — because the browser must not translate dates itself: Intl reads CLDR and WordPress reads the corex translation files, and in Arabic those disagree. One dictionary, exported.