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.
1 parent 53a1e49 commit 137c66aCopy full SHA for 137c66a
packages/console/core/src/util/date.ts
@@ -1,7 +1,7 @@
1
export function getWeekBounds(date: Date) {
2
const dayOfWeek = date.getUTCDay()
3
const start = new Date(date)
4
- start.setUTCDate(date.getUTCDate() - dayOfWeek)
+ start.setUTCDate(date.getUTCDate() - dayOfWeek + 1)
5
start.setUTCHours(0, 0, 0, 0)
6
const end = new Date(start)
7
end.setUTCDate(start.getUTCDate() + 7)
0 commit comments