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; } export { startOfTime as a, startOfDate as s };