UNPKG

@daysnap/utils

Version:
19 lines (11 loc) 638 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkBQ7SLF6Ccjs = require('./chunk-BQ7SLF6C.cjs'); var _chunkHEVW5ZN2cjs = require('./chunk-HEVW5ZN2.cjs'); // src/getMonthBounds.ts function getMonthBounds(value, fmt) { const now = _chunkHEVW5ZN2cjs.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 ? [_chunkBQ7SLF6Ccjs.formatDate.call(void 0, start, fmt), _chunkBQ7SLF6Ccjs.formatDate.call(void 0, end, fmt)] : [start, end]; } exports.getMonthBounds = getMonthBounds;