# Date filter lang

**URL:** <https://zola.discourse.group/t/date-filter-lang/1559>\
**Category:** Feature requests\
**Created:** [December 4, 2022, 9:56pm UTC](https://zola.discourse.group/t/date-filter-lang/1559 "2022-12-04T21:56:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hugotrentesaux/32/105_2.png) [@HugoTrentesaux](https://zola.discourse.group/u/HugoTrentesaux)\
**Post date:** [December 4, 2022, 9:56pm UTC](https://zola.discourse.group/t/date-filter-lang/1559/1 "2022-12-04T21:56:50Z")

</div>

After date locale ([Tera date-locale feature](https://zola.discourse.group/t/tera-date-locale-feature/1443)), we could add a language feature. For example:

```nohighlight
{{ 1648252203 | date(format="%d %B %Y") }}
{# returns 25 March 2022 #}
{{ 1648252203 | date(format="%d %B %Y", lang="fr") }}
{# could return 25 mars 2022 #}

```

I don’t know how I would achieve this, but this could be nice for i18n of theming.

[edit] read that [here](https://docs.rs/chrono/0.4.23/chrono/)

Chrono now also provides date formatting in almost any language without the help of an additional C library. This functionality is under the feature `unstable-locales`:

[edit] RTFM

```auto
Example: {{ 1648252203 | date(format="%A %-d %B", timezone="Europe/Paris", locale="fr_FR") }}

```

---

<div class="post-metadata">

**Author:** ![tuxmain](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/tuxmain/32/623_2.png) [@tuxmain](https://zola.discourse.group/u/tuxmain)\
**Post date:** [December 4, 2022, 10:15pm UTC](https://zola.discourse.group/t/date-filter-lang/1559/2 "2022-12-04T22:15:05Z")

</div>

The `locale` argument already does this, afaik it only translates weekday and month names. It is distinct from the preexisting `timezone` argument. Are you talking about something else?

I find the wording “locale” misleading and prefer “lang”, but “locale” looks more conventional for this usage, and it’s the name of the chrono feature.

---

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hugotrentesaux/32/105_2.png) [@HugoTrentesaux](https://zola.discourse.group/u/HugoTrentesaux)\
**Post date:** [December 4, 2022, 10:16pm UTC](https://zola.discourse.group/t/date-filter-lang/1559/3 "2022-12-04T22:16:05Z")

</div>

Je vais supprimer suite à mon RTFM 😉 [edit] je peux pas  
et en plus ça a l’air de par marcher 😕
