嘗試在db中加載blob時(shí),為什么會(huì)出現(xiàn)java.lang.AbstractMethodError?
嘗試在db中加載blob時(shí),為什么會(huì)出現(xiàn)java.lang.AbstractMethodError?Date.parse('1997-07-16T19:20:15') // ISO 8601 FormatsDate.parse('1997-07-16T19:20:30+01:00') // ISO 8601 with Timezone offset編輯:正則表達(dá)式版本x = "2011-01-28T19:30:00EST"MM = ["January", "February","March","April","May","June","July","August","September","October","November", "December"]xx = x.replace( /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):\d{2}(\w{3})/, function($0,$1,$2,$3,$4,$5,$6){ return MM[$2-1]+" "+$3+", "+$1+" - "+$4%12+":"+$5+(+$4>12?"PM":"AM")+" "+$6 })結(jié)果January 28, 2011 - 7:30PM ESTEdit2:我把我的時(shí)區(qū)改為EST,現(xiàn)在我跟進(jìn)了x = "2011-01-28T19:30:00-05:00"MM = {Jan:"January", Feb:"February", Mar:"March", Apr:"April", May:"May", Jun:"June", Jul:"July", Aug:"August", Sep:"September", Oct:"October", Nov:"November", Dec:"December"}xx = String(new Date(x)).replace( /\w{3} (\w{3}) (\d{2}) (\d{4}) (\d{2}):(\d{2}):[^(]+\(([A-Z]{3})\)/, function($0,$1,$2,$3,$4,$5,$6){ return MM[$1]+" "+$2+", "+$3+" - "+$4%12+":"+$5+(+$4>12?"PM":"AM")+" "+$6 })返回January 28, 2011 - 7:30PM EST基本上String(new Date(x))返回Fri Jan 28 2011 19:30:00 GMT-0500 (EST)正則表達(dá)式部分只是將上面的字符串轉(zhuǎn)換為您需要的格式。January 28, 2011 - 7:30PM EST
查看完整描述