Time / i18n formatter

CakePHP 3.4
How can I print a date with the name of the day but not hours ?
i18nFormat([\IntlDateFormatter::FULL, \IntlDateFormatter::SHORT])
shows dates with hours, minutes and seconds.
What if I want Sunday April 24 2019 ?

in https://book.cakephp.org/3.0/en/core-libraries/time.html#Cake\I18n\Time::i18nFormat there is a link with formatting options http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details

also you can use https://book.cakephp.org/3.0/en/core-libraries/time.html#setting-the-default-locale-and-format-string to be able to use it like

<?= $entity->some_date ?>

Thank you for answering.

<?= $entity->some_date ?>

does not work all the time.
I have a field (type = time) so data is formatted 10:15:00 but <?= $entity->some_date ?> prints today’s date + 10:15:00.

well you need to set how you want to display it, its in link i gave

You can pass any standard date format string to the format function, so $entity->some_date->format('l F j Y') should do the job for you here, if you need that format only in certain places.

Thank you, we’re close :slight_smile:

This works fine but months and days are in English.
Why doesn’t it rely on the defaultLocale ?