We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1d58b13 + 0115b5a commit 28199fcCopy full SHA for 28199fc
src/components/dashboard/Usage.vue
@@ -70,9 +70,9 @@ async function getUsages() {
70
cycleDay = currentDay
71
}
72
else {
73
- const cycleStartDay = cycleStart.getDate()
74
- const daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).getDate()
75
- cycleDay = (currentDay - cycleStartDay + 1 + daysInMonth) % daysInMonth
+ const cycleStartDay = cycleStart.getUTCDate()
+ const daysInMonth = new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() + 1, 0)).getUTCDate()
+ cycleDay = (currentDate.getUTCDate() - cycleStartDay + 1 + daysInMonth) % daysInMonth
76
if (cycleDay === 0)
77
cycleDay = daysInMonth
78
0 commit comments