mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
feat: "today" when using date filter, fixes #193
This commit is contained in:
@@ -4,7 +4,7 @@ import { isString, isNumber } from '../../util/underscore'
|
||||
export default {
|
||||
'date': (v: string | Date, arg: string) => {
|
||||
let date = v
|
||||
if (v === 'now') {
|
||||
if (v === 'now' || v === 'today') {
|
||||
date = new Date()
|
||||
} else if (isNumber(v)) {
|
||||
date = new Date(v * 1000)
|
||||
|
||||
Reference in New Issue
Block a user