How do you insert dates in couchdb? As strings?
I have couchdb-1.0.3.
1.
I did this:
$ curl -X PUT 127.0.0.1:5984/misc/doc1 -d '{"date":"2011-13-01T17:30:12+01:00"}'
This works, but this date doesn't exists.
2.
I thought I had to do this:
$ curl -X PUT 127.0.0.1:5984/misc/doc1 -d '{"date":new Date("2011-12-01)}'
But this is invalid JSON.
3.
When I use this format,
$ curl -X PUT 127.0.0.1:5984/misc/doc1 -d '{"date":"2011/12/01 00:00:00"}'
I doesn't work well with this format
$ curl -X GET '127.0.0.1:5984/misc/_design/foo/_view/view1?startkey="2012-02-02"'
Because the document shows up in the result.
Thanks,
Eric J.