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

Date filter returns undefined for %B #28

Open
stewartknapman opened this issue Nov 18, 2014 · 0 comments
Open

Date filter returns undefined for %B #28

stewartknapman opened this issue Nov 18, 2014 · 0 comments
Labels

Comments

@stewartknapman
Copy link

I'm using the date filter to output a date with the following format:

{{ current_article.date | date: '%d %B %Y' }}

However it is returning 15 undefined 2014. It looks like toLocaleDateString() is returning the date in the format dd/mm/yyyy rather than what was expected in the filters file i.e. Wednesday April 11 2012.

See: https://github.com/leizongmin/tinyliquid/blob/master/lib/filters.js#L209-L210

EDIT: it would seem that the format is dependant on the platform, locale and user's settings.
http://stackoverflow.com/a/8002651/1311767

@leizongmin leizongmin added the bug label Nov 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants