UNPKG

@qntm-code/utils

Version:

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

8 lines (7 loc) 258 B
import { setStartOfHour } from '../setters/index.js'; /** * Takes an optional date and returns a new Date object set to the start of the given/current hour */ export function getStartOfHour(date = new Date()) { return setStartOfHour(new Date(date)); }