Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tera date-locale feature #1978

Merged
merged 1 commit into from
Sep 4, 2022
Merged

Tera date-locale feature #1978

merged 1 commit into from
Sep 4, 2022

Conversation

ZettaScript
Copy link
Contributor

Code changes

Add tera's feature date-locale, to enable setting the locale when using the date filter in templates.

Fixes #1103

@Keats Keats merged commit 68910b6 into getzola:next Sep 4, 2022
@Keats
Copy link
Collaborator

Keats commented Sep 4, 2022

Thanks!

@Keats
Copy link
Collaborator

Keats commented Jan 12, 2023

Just to double check, have you tried that this works for you?

@ZettaScript
Copy link
Contributor Author

I've just checked with next HEAD, it works. To check: {{page.date | date(locale="fr_FR", format="%A %d %B, %H:%M")}}

However it's not very convenient because you have to use the fr_FR format instead of only fr. I'll see how to fix that in Tera. (maybe there is a canonical way to convert xx to xx_XX)

@Keats
Copy link
Collaborator

Keats commented Jan 12, 2023

It's a bit annoying but I wouldn't bother with changing that

Keats pushed a commit that referenced this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants