@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
12 lines (11 loc) • 427 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStartOfSecond = 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 second
*/
function getStartOfSecond(date = new Date()) {
return (0, index_js_1.setStartOfSecond)(new Date(date));
}
exports.getStartOfSecond = getStartOfSecond;