Issue with 'now' in data filter
Joelith opened this issue · comments
Joel Nation commented
Using this string in the template - {{'now' | date: '%d'}} - does not work. I think it's due to this line:
if(!date instanceof Date && input == 'now'){ date = new Date(); }
it should be:
if(!(date instanceof Date) && input == 'now'){ date = new Date(); }
as otherwise it checks whether !date is an instance of Date, not that date is not an instance of Date.
Matt McCray commented
Fix applied and tagged as version 1.2.1.
Thanks.