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

new: LiquidOptions.dateFormat to override default date format #587

Merged
merged 1 commit into from Feb 22, 2023

Conversation

prassie
Copy link
Contributor

@prassie prassie commented Feb 20, 2023

doc: updates related to LiquidOptions.dateFormat
doc: revamped the date filter doc for easier reference

const liquidjs = require("liquidjs");
console.log(new liquidjs.Liquid({ dateFormat: '%d%q of %b %Y at %I:%M %P %z'})
                        .parseAndRenderSync(`{{ '1990-12-31T23:30:28Z' | date: undefined, -330 }}`));

=> 01st of Jan 1991 at 05:00 am +0530

Can be used as a workaround for #567, though the date format flags need to be strftime compatible.

doc: updates related to LiquidOptions.dateFormat
doc: revamped the date filter doc for easier reference
@harttle
Copy link
Owner

harttle commented Feb 22, 2023

Thanks @prassie for updating the docs, it's surely outdated since the source code changed a lot, it indeed looks better, thank you!

github-actions bot pushed a commit that referenced this pull request Feb 22, 2023
# [10.6.0](v10.5.0...v10.6.0) (2023-02-22)

### Features

* LiquidOptions.dateFormat to override default date format ([#587](#587)) ([3fb6646](3fb6646))
@github-actions
Copy link

🎉 This PR is included in version 10.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants