Get the beginning of a day - Node.js Date

Node.js examples for Date:Day

Description

Get the beginning of a day

Demo Code

Date.prototype.beginningOfDay = function () {
  this.setHours(0)//from w ww.  j a  va  2 s . co  m
  this.setSeconds(0)
  this.setMilliseconds(0)
  return this
}

Related Tutorials