"use strict"; function startOfDate(date, y, m, d) { return +new Date( y || date.getFullYear(), m == null ? date.getMonth() : m, d || date.getDate() ); } function startOfTime(date, ms) { const input = +date; return input - input % ms; } exports.startOfDate = startOfDate; exports.startOfTime = startOfTime;