Frank 2 mesi fa
parent
commit
2e875b2d65
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      packages/console/core/src/util/date.ts

+ 1 - 1
packages/console/core/src/util/date.ts

@@ -1,7 +1,7 @@
 export function getWeekBounds(date: Date) {
   const dayOfWeek = date.getUTCDay()
   const start = new Date(date)
-  start.setUTCDate(date.getUTCDate() - dayOfWeek)
+  start.setUTCDate(date.getUTCDate() - dayOfWeek + 1)
   start.setUTCHours(0, 0, 0, 0)
   const end = new Date(start)
   end.setUTCDate(start.getUTCDate() + 7)