Skip to content

Commit

Permalink
fix: totalMin calculation in TimeSlots. (jquense#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amazing Marvin authored and jquense committed Sep 21, 2018
1 parent 6a94e72 commit b761e86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/TimeSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const getKey = (min, max, step, slots) =>
export function getSlotMetrics({ min: start, max: end, step, timeslots }) {
const key = getKey(start, end, step, timeslots)

const totalMin = dates.diff(start, end, 'minutes') + getDstOffset(start, end)
const totalMin =
1 + dates.diff(start, end, 'minutes') + getDstOffset(start, end)
const minutesFromMidnight = dates.diff(
dates.startOf(start, 'day'),
start,
Expand Down

0 comments on commit b761e86

Please sign in to comment.