web/ChangelogEntry: fix off-by-one changelog date in some cases
This commit is contained in:
parent
2dc9d64092
commit
2fcda9c705
1 changed files with 3 additions and 4 deletions
|
@ -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(" ");
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue