Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

empty-time

Sets the time component of a Date object to either 00:00:00.000 or 23:59:59.999

date util

readme

empty-time

Sets the time component of a Date object to either 00:00:00.000 or 23:59:59.999

const emptyTime = require('empty-time');

const now = new Date();
emptyTime(now); // sets time to 00:00:00.000
emptyTime.toDayEnd(now); // sets time to 23:59:59.999

Installation

$ npm install empty-time --save