UNPKG

@daysnap/utils

Version:
19 lines (11 loc) 638 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkBPNPYUBRcjs = require('./chunk-BPNPYUBR.cjs'); var _chunkRTTG26O5cjs = require('./chunk-RTTG26O5.cjs'); // src/getMonthBounds.ts function getMonthBounds(value, fmt) { const now = _chunkRTTG26O5cjs.normalizeDate.call(void 0, value); const start = new Date(now.getFullYear(), now.getMonth(), 1); const end = new Date(now.getFullYear(), now.getMonth() + 1, 0); return fmt ? [_chunkBPNPYUBRcjs.formatDate.call(void 0, start, fmt), _chunkBPNPYUBRcjs.formatDate.call(void 0, end, fmt)] : [start, end]; } exports.getMonthBounds = getMonthBounds;