UNPKG

d2-ui

Version:
13 lines (11 loc) 314 B
import interval from "./interval"; import {hour} from "./duration"; export default interval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { date.setTime(+date + step * hour); }, function(start, end) { return (end - start) / hour; }, function(date) { return date.getUTCHours(); });