change date format function as template filter