JS Date格式化為yyyy-MM-dd類字符串 Date.prototype.format = function(format) { var o = { "M+" : this.getMonth()+1, //month "d+" ...