French month and day names are hardcoded in librairies/Utils/DateHelper.php, in four static arrays plus a fifth in app/config.php.
Skip this issue entirely if #219 has landed with the i18n constraint — that is the natural place for this work.
The duplicates
| Location |
Array |
DateHelper.php:123 |
day names, in isoToDayName() |
DateHelper.php:135 |
month names, in monthName() |
DateHelper.php:150 |
abbreviated month names, in monthNameShort() |
DateHelper.php:172 |
day names and month names, redeclared locally inside isoToFr() |
app/config.php:91 |
$glo_moisF, capitalized, unlike the others |
ext-intl is available locally and on the host, so IntlDateFormatter supplies all of these and the component order per locale. All five arrays go.
What IntlDateFormatter does not do
The ICU fr pattern yields 1 avril and 20:30. isoToFr() currently produces 1<sup>er</sup> avril and 20h30, and both forms are part of the agenda house style.
So: IntlDateFormatter for the localized names and ordering, with the ordinal and the 20h30 time format kept as a French exception layered on top, not as the general case.
Signature becomes isoToLocale(string $date, string $locale, ...); isoToFr() stays as an @deprecated alias.
Watch-outs
hCalendar. The Google parser reads the element text, and a previous mistake here produced ~3700 Search Console errors. Check that an English date does not replay it — freezing the microformat as <abbr title="ISO"> if need be.
isoToApp() / appToIso() use the Swiss DD.MM.YYYY form in the edit forms and the Zebra datepickers. The back-office stays French, so leave them alone.
French month and day names are hardcoded in
librairies/Utils/DateHelper.php, in four static arrays plus a fifth inapp/config.php.Skip this issue entirely if #219 has landed with the i18n constraint — that is the natural place for this work.
The duplicates
DateHelper.php:123isoToDayName()DateHelper.php:135monthName()DateHelper.php:150monthNameShort()DateHelper.php:172isoToFr()app/config.php:91$glo_moisF, capitalized, unlike the othersext-intlis available locally and on the host, soIntlDateFormattersupplies all of these and the component order per locale. All five arrays go.What
IntlDateFormatterdoes not doThe ICU
frpattern yields1 avriland20:30.isoToFr()currently produces1<sup>er</sup> avriland20h30, and both forms are part of the agenda house style.So:
IntlDateFormatterfor the localized names and ordering, with the ordinal and the20h30time format kept as a French exception layered on top, not as the general case.Signature becomes
isoToLocale(string $date, string $locale, ...);isoToFr()stays as an@deprecatedalias.Watch-outs
hCalendar. The Google parser reads the element text, and a previous mistake here produced ~3700 Search Console errors. Check that an English date does not replay it — freezing the microformat as
<abbr title="ISO">if need be.isoToApp()/appToIso()use the SwissDD.MM.YYYYform in the edit forms and the Zebra datepickers. The back-office stays French, so leave them alone.