UNPKG

@sprucelabs/schema

Version:

Static and dynamic binding plus runtime validation and transformation to ensure your app is sound. 🤓

12 lines (11 loc) • 317 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getStartOfDay; function getStartOfDay(timestamp) { if (!timestamp) { timestamp = new Date().getTime(); } const date = new Date(timestamp); date.setUTCHours(0, 0, 0, 0); return date.getTime(); }