You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
437 B
16 lines
437 B
5 years ago
|
import interval from "./interval";
|
||
|
import {durationMinute} from "./duration";
|
||
|
|
||
|
var minute = interval(function(date) {
|
||
|
date.setTime(Math.floor(date / durationMinute) * durationMinute);
|
||
|
}, function(date, step) {
|
||
|
date.setTime(+date + step * durationMinute);
|
||
|
}, function(start, end) {
|
||
|
return (end - start) / durationMinute;
|
||
|
}, function(date) {
|
||
|
return date.getMinutes();
|
||
|
});
|
||
|
|
||
|
export default minute;
|
||
|
export var minutes = minute.range;
|