@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
12 lines (11 loc) • 421 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStartOfMonth = void 0;
const index_js_1 = require("../setters/index.js");
/**
* Takes an optional date and returns a new Date object set to the start of the given/current month
*/
function getStartOfMonth(date = new Date()) {
return (0, index_js_1.setStartOfMonth)(new Date(date));
}
exports.getStartOfMonth = getStartOfMonth;