List of utility methods to do Today Date Get
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; }; |