We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
liquidjs @ v9.7.0
Per https://shopify.github.io/liquid/filters/date/
To get the current time, pass the special word "now" (or "today") to date:
"now"
"today"
Looks like the "now" case works w/ liquidjs, but not the "today" keyword.
liquidjs/test/integration/builtin/filters/date.ts
Lines 14 to 16 in 31bec7e
const assert = require("assert"); const pkg = require("liquidjs/package.json"); const { Liquid } = require('liquidjs'); const engine = new Liquid({ strictFilters: true }); main() .catch(err => { console.error(err.message); process.exit(2); }); async function main() { console.log(`${pkg.name} @ v${pkg.version}`); // liquidjs @ v9.7.0 const article = {article:{published_at: new Date(2015, 6, 17)}}; const ex1 = await engine.parseAndRender(`{{ article.published_at | date: "%a, %b %d, %y" }}`, article); assert.strictEqual(ex1, "Fri, Jul 17, 15"); const ex2 = await engine.parseAndRender(`{{ article.published_at | date: "%Y" }}`, article); assert.strictEqual(ex2, "2015"); const ex3 = await engine.parseAndRender(`{{ "March 14, 2016" | date: "%b %d, %y" }}`); assert.strictEqual(ex3, "Mar 14, 16"); const ex4 = await engine.parseAndRender(`{{ "now" | date: "%Y-%m-%d %H:%M" }}`); assert.notStrictEqual(ex4, "now"); const ex5 = await engine.parseAndRender(`{{ "today" | date: "%Y-%m-%d %H:%M" }}`); assert.strictEqual(ex4, ex5); assert.notStrictEqual(ex5, "today"); console.log("SUCCESS!"); }
Expected values to be strictly equal: + actual - expected + '2020-02-18 14:51' - 'today'
The text was updated successfully, but these errors were encountered:
185312d
chore(release): 9.8.0 [skip ci]
f676207
# [9.8.0](v9.7.2...v9.8.0) (2020-02-20) ### Features * "today" when using date filter, fixes [#193](#193) ([185312d](185312d))
🎉 This issue has been resolved in version 9.8.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
No branches or pull requests
liquidjs @ v9.7.0
Per https://shopify.github.io/liquid/filters/date/
Looks like the "now" case works w/ liquidjs, but not the "today" keyword.
liquidjs/test/integration/builtin/filters/date.ts
Lines 14 to 16 in 31bec7e
OUTPUT
The text was updated successfully, but these errors were encountered: