Amend logic to figure out the months between dates (#7289)
This commit is contained in:
1 parent
d2b45e52ff
commit
a3c10d0beb
2 files changed
+4
-5
No files matched your search
@@ -30,7 +30,7 @@ export const getStaticProps: GetStaticProps<
|
||||
},
|
||||
});
|
||||
const startDate = (
|
||||
dayjs(month, "YYYY-MM").isSame(dayjs(), "month") ? dayjs() : dayjs(month, "YYYY-MM")
|
||||
dayjs(month, "YYYY-MM").isSame(dayjs(), "month") ? dayjs.utc() : dayjs.utc(month, "YYYY-MM")
|
||||
).startOf("day");
|
||||
const endDate = startDate.endOf("month");
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user