-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
Date locale #567
Comments
We have problem in JavaScript that |
JavaScript does have an |
In the meantime I used this: eleventyConfig.addFilter("localizedDate", (dateString, locale) => {
const options = { year: 'numeric', month: 'long', day: 'numeric' };
return new Date(dateString).toLocaleDateString(locale, options);
}); The downside is that it does not support string patterns. |
Yes, you're right. We can customize locale date/time string in JavaScript, but not as flexible as in strftime.
|
@harttle would an option for global/default date format help, similar to timezoneOffset? I use the similar timezoneOffset option, to get all dates in the templates converted to the required tz. Of course, this is for the developers who setup/init the Liquid engine, and not for the template designers. |
Makes sense. Thank you @prassie for the clarification. |
weekday and months are now locale specific, details please check: https://liquidjs.com/filters/date.html |
Is it possibile to format dates with the date filter in a specific language? If not, it sounds like a good feature for a templating engine.
The text was updated successfully, but these errors were encountered: