Skip to content

@pmun/utils / getThisMonthRange

Function: getThisMonthRange()

ts
function getThisMonthRange(): DateRange;

获取本月的开始和结束时间戳

Returns

DateRange

日期范围元组 [开始时间戳, 结束时间戳]

Example

ts
const [start, end] = getThisMonthRange()
// start: 本月1日 00:00:00 的时间戳
// end: 本月最后一天 23:59:59.999 的时间戳