Skip to content

getDaysInMonth ​

获取指定月份下的所有日期数组 [1,2,3...当月最后一天]

引入版本 ​

0.110.0

Demo ​

ts
import { getDaysInMonth } from '@wyfex/iutils'

console.log(getDaysInMonth('2026-09')) // [1,2,...,30]
console.log(getDaysInMonth('2026-02')) // [1,2,...,28]

基于 MIT 许可发布