Show day on post page
This commit is contained in:
@@ -27,8 +27,8 @@ module.exports = function(eleventyConfig) {
|
||||
errorMode: "allow-fallback",
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("readableDate", dateObj => {
|
||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat("LLLL yyyy");
|
||||
eleventyConfig.addFilter("readableDate", (dateObj, format = "dd LLLL yyyy") => {
|
||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat(format);
|
||||
});
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
||||
|
||||
Reference in New Issue
Block a user