mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 02:26:10 +00:00
web/ChangelogEntry: fix off-by-one changelog date in some cases
This commit is contained in:
parent
2dc9d64092
commit
2fcda9c705
|
@ -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