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