# Date notation/format working every language, except one

**URL:** <https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963>\
**Category:** Need Help\
**Created:** [June 19, 2020, 7:36pm UTC](https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963 "2020-06-19T19:36:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elbert](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@elbert](https://discourse.cakephp.org/u/elbert)\
**Post date:** [June 19, 2020, 7:36pm UTC](https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963/1 "2020-06-19T19:36:10Z")

</div>

Hi All!

I have a strange case and I can not find the reason (or solution).  
I have a multi language/locale website. When I change the locale, the notation of the date changes with it. As stated here: [https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html#localizing-dates-and-numbers](https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html#localizing-dates-and-numbers)

So In French, I see a date like this: 01/06/2020 and when I change to German, it is this: 01.06.20 and in Dutch it is 01-06-2020 . Perfect!

But when I upload the project to my webserver, I encounter a problem: All languages behave as expected, except for one (Dutch). So I think there might be something wrong with the server? But I can not figure out what (what to look for, what to Google).

So my question is: Does anybody have an idea? Is it my server? Is it something else?  
Help is much appriciated (have been struggeling for 3 days now).

THX!

---

<div class="post-metadata">

**Author:** ![dreamingmind](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dreamingmind/32/1857_2.png) [@dreamingmind](https://discourse.cakephp.org/u/dreamingmind)\
**Post date:** [June 19, 2020, 7:49pm UTC](https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963/2 "2020-06-19T19:49:25Z")

</div>

Could it be a case change in some name? Possibly your local server and production server handle miss-matched case differently.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [June 19, 2020, 8:45pm UTC](https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963/3 "2020-06-19T20:45:24Z")

</div>

Check the version of ICU that PHP is built with.

---

<div class="post-metadata">

**Author:** ![elbert](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@elbert](https://discourse.cakephp.org/u/elbert)\
**Post date:** [June 7, 2021, 2:35pm UTC](https://discourse.cakephp.org/t/date-notation-format-working-every-language-except-one/7963/4 "2021-06-07T14:35:10Z")

</div>

This is an old question I posted myself. I still haven’t figured out the reason, but fixed it another way. Maybe someone is helped by my solution, so thats why (after a year) I reply to my own question.

In bootstrap.php (in the config folder, where _routes.php_ and _app.php_ are also located) I added the following:

```auto
if(I18n::getLocale()=='nl'){
    Cake\I18n\Date::setToStringFormat('dd-MM-yyyy');
    Cake\I18n\FrozenDate::setToStringFormat('dd-MM-yyyy');
    Cake\I18n\Time::setToStringFormat('dd-MM-yyyy (HH:mm)');
    Cake\I18n\FrozenTime::setToStringFormat('dd-MM-yyyy (HH:mm)');
    Cake\I18n\Number::config('nl', \NumberFormatter::CURRENCY, [
        'pattern' => '¤ #,##0.00;-¤ #,##0.00',
    ]);
}

```

This overrides the server date-format and worked for me.

Ciao!
