Skip to content

Commit

Permalink
fix: numGroups calculation (jquense#1963)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclickbits authored Jul 28, 2021
1 parent 8e6c84d commit 319a81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/TimeSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) {
1 + dates.diff(start, end, 'minutes') + getDstOffset(start, end)
const minutesFromMidnight =
dates.diff(daystart, start, 'minutes') + daystartdstoffset
const numGroups = Math.ceil(totalMin / (step * timeslots))
const numGroups = Math.ceil((totalMin - 1) / (step * timeslots))
const numSlots = numGroups * timeslots

const groups = new Array(numGroups)
Expand Down

0 comments on commit 319a81c

Please sign in to comment.