Javascript Date shortDateString()
shortDateString()
Date.prototype.shortDateString = function(){ return this.getFullYear().toString() +'-' +(this.getMonth()+1).toString().lpad('0',2) + '-' + this.getDate().toString().lpad('0',2); };