newerthan #1

Merged
mwtkrayer merged 6 commits from newerthan into master 2020-05-22 11:55:05 +00:00
1 changed files with 9 additions and 0 deletions
Showing only changes of commit 0afdb1a2f0 - Show all commits

View File

@ -1124,6 +1124,15 @@ def build_imap_filter():
time_str = time.strftime('%d-%b-%Y', time_old)
imap_filter.append("BEFORE %s" % time_str)
if options.date_old_min == None:
time_now = time.time()
secs_old_min = (options.days_old_min * 24 * 60 * 60)
time_old = time.gmtime(time_now - secs_old_min)
else:
time_old = time.gmtime(options.date_old_min)
time_str = time.strftime('%d-%b-%Y', time_old)
imap_filter.append("SINCE %s" % time_str)
if not options.include_flagged:
imap_filter.append("UNFLAGGED")
if options.min_size: