javascript - How can I use startkey/endkeyto get list of get list based on current time with lastCheckTimestamp -


i have couchdb documents have lastchecktimestamp element record, there way can doc list more one month based on current time lastchecktimestamp record?

usin following map currentdate , lastchecktimestamp, how can use couchdb startkey endkey list of currentdate-doc.lastchecktimestamp> 30 days

  function(doc) {         if (doc.lastdocstatus == "update") {          var date = new date();     var seperator1 = "-";     var seperator2 = ":";     var month = date.getmonth() + 1;     var strdate = date.getdate();     if (month >= 1 && month <= 9) {         month = "0" + month;     }     if (strdate >= 0 && strdate <= 9) {         strdate = "0" + strdate;     }     var currentdate = date.getfullyear() + seperator1 + month + seperator1 + strdate             + " " + date.gethours() + seperator2 + date.getminutes()             + seperator2 + date.getseconds();       emit([currentdate, doc.lastchecktimestamp], doc);         }     } 

thank you


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -