You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2008/07/23 18:48:32 UTC

[Couchdb Wiki] Update of "ViewCollation" by ChrisAnderson

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by ChrisAnderson:
http://wiki.apache.org/couchdb/ViewCollation

The comment on the change is:
other date format advice

------------------------------------------------------------------------------
  {{{
  emit(Date.parse(doc.created_at), doc);
  }}}
+ 
+ Alternatively, if you use a date format which sorts lexicographically, such as "2008/06/09 13:52:11 +0000" you can just 
+ {{{
+ emit(doc.created_at, doc);
+ }}}
+ and avoid the conversion. As a bonus, this date format is compatible with the Javascript date parser, so you can use ''new Date(doc.created_at)'' in your client side Javascript to make date sorting easy in the browser.
  
  
  == Collation Specification ==