(self, val, exact=False)
return ("c.nid in {}".format(ids2str(nids)))
Find cards by edit date
Find cards by edit date
Find cards by edit date
def findLastEdited(self, val, exact=False):
    """Find cards by edit date"""
    # self is find.Finder
    try:
        days = int(val[0])
    except ValueError:
        return
    days = max(days, 0)
   
    # first cutoff at x days ago
    cutoff1 = (self.col.sched.dayCutoff - 86400*days)
    
    if exact:
        # second cutoff at x-1 days ago
        cutoff2 = cutoff1 + 86400
        # select notes that were edited on that day
        nids = self.col.db.list(
            "select id from notes where mod between {} and {}".format(
                cutoff1, cutoff2))
    else:
        # select notes that were edited since then
        nids = self.col.db.list(
            "select id from notes where mod > {}".format(cutoff1))

    return ("c.nid in {}".format(ids2str(nids)))
def findLastEdited ( self , val , exact = False ) : # self is find.Finder try : days = int ( val [ 0 ] ) except ValueError : return days = max ( days , 0 ) # first cutoff at x days ago cutoff1 = ( self . col . sched . dayCutoff - 86400 * days ) if exact : # second cutoff at x-1 days ago cutoff2 = cutoff1 + 86400 # select notes that were edited on that day nids = self . col . db . list ( "select id from notes where mod between {} and {}" . format ( cutoff1 , cutoff2 ) ) else : # select notes that were edited since then nids = self . col . db . list ( "select id from notes where mod > {}" . format ( cutoff1 ) ) return ( "c.nid in {}" . format ( ids2str ( nids ) ) )