Date mid night - Node.js Date

Node.js examples for Date:Date Calculation

Description

Date mid night

Demo Code

Date.prototype.midnight = function() { 
    this.setHours(0); // w  ww  .ja  v a  2s .  co m
    this.setMinutes(0); 
    this.setSeconds(0); 
    this.setMilliseconds(0); 
    return this; 
}

Related Tutorials