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.
15 lines
453 B
15 lines
453 B
import interval from "./interval"; |
|
|
|
var utcMonth = interval(function(date) { |
|
date.setUTCDate(1); |
|
date.setUTCHours(0, 0, 0, 0); |
|
}, function(date, step) { |
|
date.setUTCMonth(date.getUTCMonth() + step); |
|
}, function(start, end) { |
|
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; |
|
}, function(date) { |
|
return date.getUTCMonth(); |
|
}); |
|
|
|
export default utcMonth; |
|
export var utcMonths = utcMonth.range;
|
|
|