Skip to content

Instantly share code, notes, and snippets.

@mcqueenorama
Created July 21, 2014 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcqueenorama/1c617b2ed1b3a0aacf53 to your computer and use it in GitHub Desktop.
Save mcqueenorama/1c617b2ed1b3a0aacf53 to your computer and use it in GitHub Desktop.
compound key
function(doc) {
if (doc.matchedItem && doc.timeStamp) {
var dint = parseInt(doc.timeStamp) * 1000;
var ss = new Date(dint);
emit([ss.getFullYear(), ss.getMonth(), ss.getDate(), ss.getHours(), ss.getMinutes()], null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment