Skip to main content

Module formats

Module formats 

Source
Expand description

The date format contract: PHP patterns on the server; frontend_config exports the equivalent Day.js patterns.

Enums§

Kind
Which pattern: a date, a date-time or a month/year.
Purpose
What the pattern is for.

Functions§

format
The pattern for a kind and purpose: dates.<purpose>.<kind>, then dates.<kind>, then the legacy app.date_format_solo / app.date_format, then fallback or the built-in default.
frontend_config
The patterns of every kind and purpose in Day.js tokens, as JSON for a frontend.
to_dayjs
Translate a PHP pattern to Day.js tokens: Y y m n d j H G h g i s a A D l M F w v O P U, escaped literals and any non-letter. U needs Day.js’s advancedFormat plugin.