(now, start, end)
| 274 | }; |
| 275 | |
| 276 | export const calculateNowPosition = (now, start, end) => { |
| 277 | if (isBefore(now, start) || isAfter(now, end)) return -1; |
| 278 | const minutesSinceStart = diff(now, start, 'minute'); |
| 279 | return (minutesSinceStart / MINUTE_INCREMENT) * MINUTE_BLOCK_WIDTH; |
| 280 | }; |
| 281 | |
| 282 | export const calculateScrollPosition = (now, start) => { |
| 283 | const roundedNow = roundToNearest(now, 30); |
no test coverage detected