feat: "today" when using date filter, fixes #193

This commit is contained in:
harttle
2020-02-21 01:48:10 +08:00
parent 5cd42f4500
commit 185312dbff
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -14,6 +14,9 @@ describe('filters/date', function () {
it('should create a new Date when given "now"', function () {
return test('{{ "now" | date: "%Y"}}', (new Date()).getFullYear().toString())
})
it('should create a new Date when given "today"', function () {
return test('{{ "today" | date: "%Y"}}', (new Date()).getFullYear().toString())
})
it('should parse as Date when given UTC string', function () {
return test('{{ "1991-02-22T00:00:00" | date: "%Y"}}', '1991')
})