web/ChangelogEntry: fix off-by-one changelog date in some cases

This commit is contained in:
dumbmoron 2024-09-09 20:35:12 +00:00
parent 2dc9d64092
commit 2fcda9c705
No known key found for this signature in database

View file

@ -15,15 +15,14 @@
const formatDate = (dateString: string) => {
const date = new Date(dateString);
const months = ["January", "February", "March", "April", "May",
"June", "July", "August", "September", "October",
"November", "December"];
return [
months[date.getUTCMonth()],
date.getUTCDate() + 1 + ",",
date.getUTCFullYear(),
months[date.getMonth()],
date.getDate() + ",",
date.getFullYear(),
].join(" ");
};