Nodejs Utililty Methods Today Date Get

List of utility methods to do Today Date Get

Description

The list of methods to do Today Date Get are organized into topic(s).

Method

today()
Date.prototype.today = function () { 
    return  this.getFullYear() + '-'+ (((this.getMonth()+1) < 10)?"0":"") + (this.getMonth()+1)+ "-" + ((this.getDate() < 10)?"0":"") + this.getDate();
today()
Date.prototype.today = function()
  return ((this.getDate() < 10)?"0":"") + this.getDate() +"/"+(((this.getMonth()+1) < 10)?"0":"") + (this.getMonth()+1) +"/"+ this.getFullYear();
};
today()
'use strict';
Date.today = function () {
  let now = new Date();
  now.setHours(0, 0, 0, 0);
  return now;
};