Skip to content

Takes Date object and returns another Date object set to the same date at midnight local time.

Notifications You must be signed in to change notification settings

rossb/get-midnight-date

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-midnight-date

Takes Date object and returns another Date object set to the same date at midnight local time.

Install

$ npm install get-midnight-date --save

Usage

const GetMidnightDate = require('get-mignight-date');

let currentTime = new Date();
let today = GetMidnightDate(currentTime);

About

Takes Date object and returns another Date object set to the same date at midnight local time.

Resources

Stars

Watchers

Forks

Packages