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
397 B
16 lines
397 B
1 year ago
|
import interval from "./interval";
|
||
|
import {durationDay} from "./duration";
|
||
|
|
||
|
var utcDay = interval(function(date) {
|
||
|
date.setUTCHours(0, 0, 0, 0);
|
||
|
}, function(date, step) {
|
||
|
date.setUTCDate(date.getUTCDate() + step);
|
||
|
}, function(start, end) {
|
||
|
return (end - start) / durationDay;
|
||
|
}, function(date) {
|
||
|
return date.getUTCDate() - 1;
|
||
|
});
|
||
|
|
||
|
export default utcDay;
|
||
|
export var utcDays = utcDay.range;
|