Skip to content

Commit

Permalink
fix dates (month was off-by-1)
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Jan 1, 2025
1 parent b64591a commit 2fcdccc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notes/_build/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export default function (eleventyConfig) {

eleventyConfig.addFilter("fmt_date", (dateObj) => {
let date = new Date(dateObj);
return `${date.getUTCFullYear()}-${("0" + date.getUTCMonth()).slice(-2)}-${(
"0" + date.getUTCDate()
).slice(-2)}`;
return `${date.getUTCFullYear()}-${("0" + (date.getUTCMonth() + 1)).slice(
-2
)}-${("0" + date.getUTCDate()).slice(-2)}`;
});
// current date for rss feed
eleventyConfig.addFilter("getNowDate", () => {
Expand Down

0 comments on commit 2fcdccc

Please sign in to comment.