Dates in views

11 views
Skip to first unread message

Meikel Brandmeyer

unread,
Dec 13, 2010, 8:27:50 AM12/13/10
to clojure...@googlegroups.com
Hi,

what is the usual approach to emit keys containing dates? Should I convert things to a UTC string? Or can I simply emit a java.util.Date or org.joda.time.DateTime?

Sincerely
Meikel

Chas Emerick

unread,
Dec 15, 2010, 2:07:28 PM12/15/10
to clojure...@googlegroups.com
IIRC, any value supplied as document id will be stringified, so you almost certainly don't want j.u.Date; I don't know what joda's DateTime does.

FWIW, I use ISO 8601 for all dates. I know the world doesn't need more date-handling code, but here's what I use (good enough for my purposes; at the very least, you might find the ISO 8601 date format string helpful):

https://gist.github.com/742432

- Chas

Reply all
Reply to author
Forward
0 new messages