Closed sywhb closed 1 year ago
A bit confused with this one. How does a user set it?
@jacksonh it's a generic way of formatting a date.
For example, in the front matter template, i could format an available date variable to use yyyy-MM-dd
format
date-archived: {{#formatDate}}{{{dateArchived}}},"yyyy-MM-dd"{{/formatDate}}
and it will turn out to be
date-archived: 2023-09-29
Any comment here? @jacksonh
added a function
formatDate
to the template which allows users to format a date.For example, if i want to format
dateArchived
asyyyy-MM-dd
, I could add following to the template:The
formatDate
lambda takes in a string of the date variable and the format which are separated by a comma.Fixes #119