Here you can find the source of getMinutesTwoDigits()
Date.prototype.getMinutesTwoDigits = function() { var retval = this.getMinutes(); if (retval < 10) {/* www . j av a2s.com*/ return ("0" + retval.toString()); } else { return retval.toString(); } };
Date.prototype.getMinute = function () { return (this.getMinutes() < 10 ? '0' : '') + this.getMinutes(); };
Date.prototype.getMinutesFormatted = function(number) { var minutes = this.getMinutes(); return minutes < 10 ? '0' + minutes : minutes; };
Date.prototype.getSimpleMinutes = function getSimpleMinutes() { var ss_ofs = this.getDaySimpleSeconds(); var sm_ofs = Math.floor(ss_ofs/100); var sh_ofs = Math.floor(sm_ofs/100); return sm_ofs-sh_ofs*100;
Date.prototype.isXMinutesBeforeNow = function(minutes) minutes = parseInt(minutes); if (minutes !== minutes){ console.warn('Date.isXMinutesBeforeNow: @param: minutes is NaN'); return true; var d = Date.now(); return (d - this) > (parseInt(minutes) * 60 *1000); ...
Date.prototype.olderThan = function(minutes) { var now = new Date(); return now.getTime() - this.getTime() > minutes*60*1000 };
Date.prototype.removeMinutes = function (m) { this.setMinutes(this.getMinutes()-m); return this; };