Date Helper
Helper |
Description |
formatDate |
Use moment to format the date. |
Use moment to format the date.
Parameters:
format: string
A format string based on
moment.
date: string
Date string to format.
locale: string|string[]
// results in: 2021/10/25
hbs.compile("{{formatDate 'YYYY/MM/DD' date}}")({"date":"2021-10-24T23:11:14.275Z"});
// results in: 2021/10/25
hbs.compile("{{formatDate 'YYYY/MM/DD' date 'jp'}}")({"date":"2021-10-24T23:11:14.275Z"});
// results in: 2021/10/25
hbs.compile("{{formatDate 'YYYY/MM/DD' date 'es'}}")({"date":"2021-10-24T23:11:14.275Z"});