Strict ISO 8601 tokens: MM=month (always), mm=minute

This commit is contained in:
Richard Zink committed 2026-10-07 13:14:45 +02:00
1 parent 2c0e84d267
commit 0bcb9878b1
2 files changed
+23 -21

No files matched your search

+10 -9
View File
@@ -13,23 +13,24 @@
* window.TRANSLATIONS in i18n.js. English ('en') is the base;
* if a key is missing in the current language, English is used.
*
* timeFormat - Format string for the digital clock, using ISO-8601-ish
* tokens. Any character that is not a token is treated as a
* literal (including whitespace).
* timeFormat - Format string for the digital clock, using strict
* ISO 8601 tokens (case-sensitive). Any other character is
* treated as a literal (including whitespace).
*
* YYYY 4-digit year (2026)
* MM month 01-12 (10)
* MM month 01-12 (10) - always month
* DD day 01-31 (07)
* HH hour 00-23 (24h) (14)
* hh hour 01-12 (12h) (02)
* a AM / PM (PM)
* mm minute 00-59 (35)
* ss second 00-59 (22)
* mm minute 00-59 (35) - lowercase!
* ss second 00-59 (22) - lowercase!
* sss millisecond 000-999 (456)
* T literal 'T'
*
* Date-only forms: YYYY, YYYY-MM, YYYY-MM-DD
* Date-time forms: above + T + HH:mm, HH:mm:ss, HH:mm:ss.sss
* Any other character is a literal (incl. spaces).
* Any other character is a literal (incl. spaces, tabs, \n).
*
* Note: MM is ALWAYS month (ISO). For minutes use mm (lowercase).
*
* Examples:
* 'HH:mm:ss' -> 14:35:22