How do you insert dates in couchdb? How are the lines?
I have couchdb-1.0.3.
1.
I have done this:
$ curl -X PUT 127.0.0.1:5984/misc/doc1 -d '{"date":"2011-13-01T17:30:12+01:00"}'
It works, but this date does not exist.
2.
I thought I should have done this:
$ curl -X PUT 127.0.0.1:5984/misc/doc1 -d '{"date":new Date("2011-12-01)}'
But this is not valid 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 do not work very well with this format
$ curl -X GET '127.0.0.1:5984/misc/_design/foo/_view/view1?startkey="2012-02-02"'
Because the document appears as a result.
Thank,
Eric J.
source
share