Date format as prototype class Date
Date.prototype.dateFormat = function() {
var landingNull = function(value, month) {
return ('0' + (month ? value + 1 : value).toString()).slice(-2);
};
return this.getFullYear() + '-' + landingNull(this.getMonth(), true) + '-' + landingNull(this.getDate());
};