UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

14 lines (13 loc) 405 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setEndOfWeek = void 0; const index_js_1 = require("./index.js"); /** * Takes a given date and mutates it to the end of the given week */ function setEndOfWeek(date) { (0, index_js_1.setEndOfDay)(date); date.setDate(date.getDate() + (7 - date.getDay())); return date; } exports.setEndOfWeek = setEndOfWeek;