# Fechas en español

**URL:** <https://discourse.cakephp.org/t/fechas-en-espanol/2028>\
**Category:** Uncategorized\
**Tags:** i18n\
**Created:** [February 9, 2017, 2:43pm UTC](https://discourse.cakephp.org/t/fechas-en-espanol/2028 "2017-02-09T14:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oxicode](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/oxicode/32/516_2.png) [@Oxicode](https://discourse.cakephp.org/u/Oxicode)\
**Post date:** [February 9, 2017, 2:43pm UTC](https://discourse.cakephp.org/t/fechas-en-espanol/2028/1 "2017-02-09T14:43:13Z")

</div>

Hola

Alguien me puede ayudar a mostrar las fechas en español:

bootstrap.php  
`Time::setDefaultLocale('es-ES'); FrozenTime::setDefaultLocale('es-ES'); Date::setDefaultLocale('es-ES'); FrozenDate::setDefaultLocale('es-ES');`

Any controller  
`echo Chronos::now()->format('l');`

Me debería imprimir Jueves, pero imprime Thursday

Por favor su apoyo, gracias.

---

<div class="post-metadata">

**Author:** ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)\
**Post date:** [February 10, 2017, 1:59am UTC](https://discourse.cakephp.org/t/fechas-en-espanol/2028/2 "2017-02-10T01:59:28Z")

</div>

You should use [i18n\Time::i18nFormat](https://book.cakephp.org/3.0/en/core-libraries/time.html#formatting) and its default locale (I don’t know why the default is not i18n::locale)  
I tried this with the cake console. (default locale is es\_AR’)

```auto
>> use Cake\I18n\Time;
=> null
>>> Time::now()->i18nFormat('EEEE');
=> "jueves"
>>> Time::setDefaultLocale('pt_BR');
=> null
>>> Time::now()->i18nFormat('EEEE');
=> "quinta-feira"

```

---

<div class="post-metadata">

**Author:** ![Oxicode](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/oxicode/32/516_2.png) [@Oxicode](https://discourse.cakephp.org/u/Oxicode)\
**Post date:** [February 13, 2017, 6:51am UTC](https://discourse.cakephp.org/t/fechas-en-espanol/2028/3 "2017-02-13T06:51:17Z")

</div>

Gracias, eres lo máximo.
