Skip to content

Instantly share code, notes, and snippets.

@yedi
Created November 20, 2012 18:25
Show Gist options
  • Save yedi/4119854 to your computer and use it in GitHub Desktop.
Save yedi/4119854 to your computer and use it in GitHub Desktop.
function(doc) {
if(doc.base_doc === "CouchUser") {
var ll = new Date(doc.last_login);
var eula_date = new Date("2012-11-01");
if (!(doc.eula.signed) && (ll > eula_date ) {
emit(doc.username, doc.last_login, null);
}
}
}
@alappe
Copy link

alappe commented Nov 20, 2012

function(doc) {
if(doc.base_doc === "CouchUser") {
var ll = new Date(doc.last_login);
var eula_date = new Date("2012-11-01");
if (!(doc.eula.signed) && (ll > eula_date)) {
emit(doc.username, doc.last_login, null);
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment