I did not find any documentation on the Date object that is used within a map function of a couchDB view. There is some strange behaviour that I encountered and I need some closure.
Following code:
emit(doc.type, { date: new Date() })
outputs:
{ date: "2012-03-10T18:57:32.408Z" }
Yet using:
emit(doc.type, { date: new Date("1984-12-10") })
outputs:
{ date: "Invalid Date" }
So what Date object is couchDB using here? It cannot be the JavaScript one, because new Date("1984-12-10") works there. couchDB however expects the date in a "1984/12/10" format.
Does anybody has any information concerning this issue?