date-range-arr
v1.0.1
Published
年、月、日范围内的全部时间数组
Downloads
4
Readme
安装
npm install date-range
导入
const dateRangeUtil = require('date-range')
获取起始年、结束年范围内的日期数组
let yearArr = dateRangeUtil.getYearBetween('2021-01', '2023-01') // 传入值格式必须是字符串格式时间
获取起始月、结束月范围内的日期数组
let monthArr = dateRangeUtil.getMonthBetween('2021-01', '2022-03') // // 传入值格式必须是字符串格式时间
获取起始年、结束年范围内的日期数组
let dayArr = dateRangeUtil.getAllDate('2021-01-01', '2021-12-31') // 传入值格式必须是字符串格式时间 且 yyyy-MM-dd