Locale formats contain CLDR pattern letters that isoFormat() reads differently
Author: kamthornCreated Sep 30, 2026Updated Oct 1, 2026
Labelsbug
Some locale formats were copied from CLDR patterns without converting them to isoFormat() tokens. In CLDR, yy is a 2-digit year and d is the day of the month. In isoFormat(), yy isn't a token (it's printed literally), and d is the day of the week.
Examples on master for 2026-09-30 (a Wednesday):
| Locale | Format | Output |
|---|---|---|
es_PH |
L = D/M/yy |
30/9/yy |
ps, ps_AF |
L = YYYY/M/d |
2026/9/3 |
seh |
LL = d [de] MMM [de] YYYY |
3 de Set de 2026 |
fur, fur_IT |
LL = DD di MMMM dal YYYY |
30 3i setembar 3pm30. 9. 26 2026 |
In fur, the words "di" and "dal" aren't escaped, so d, a and l are read as tokens.
Affected files:
yyinL(13 files, 15 locales):es_PH,fo_DK,hr_BA,ms_BN,ms_SG,ne_IN,nnh,pa_Guru,sr_Cyrl_BA,sr_Latn_BA,ta_MY,ta_SG,uz_Cyrl- lone
dused as the day of the month:ne_IN,nnh,ps,seh - unescaped words:
fur_IT
A fix is proposed in #3370. Each change is checked against CLDR 48.2.2, and a regression test checks that no locale format contains an unescaped y or N.
Source: briannesbitt/Carbon