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