mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 18:46:09 +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 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(" ");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue