1
我在文檔中有一些日期並試圖操作它們。我期待的JavaScript支持標準的日期方法,如toISOString()
,但令我驚訝的是我得到一個錯誤Database command 'mapreduce' failed: (assertion: 'invoke failed: JS Error: TypeError: entry.start.toISOString is not a function nofile_b:0'; assertionCode: '9004'; errmsg: 'db assertion failure'; ok: '0.0').
有沒有MongoDB的地圖減少JavaScript的參考?
我怎樣才能找出什麼是由Map Reduce運行環境支持?
你確定'entry.start'是一個Date嗎? – 2012-07-26 07:22:05
@ muistooshort是的。我可以調用'entry.start.toUTCString()'而不是'entry.start.toISOString()' – Roman 2012-07-26 07:25:16