From c370524907f486be352924083c26bee3f374b963 Mon Sep 17 00:00:00 2001 From: Joe Nyland Date: Mon, 11 Apr 2016 22:22:39 +0100 Subject: [PATCH] Update README.md to clarify time-based filters Added an example to the README to show how the the `:before` and `:after` time-based filters work. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d3d20c7..02d7478 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,16 @@ gmail.inbox.find(:unread).each do |email| end ``` +Note: The `:before` and `:after` filters only go as far as to search for messages on the date: + +```ruby +# E.g. the following will return messages between 2016-01-01 00:00:00 and 2016-04-05 00:00:00 +gmail.inbox.find( + :after => Time.parse('2016-01-01 07:50:21'), + :before => Time.parse('2016-04-05 21:55:05') + ) +``` + ### Working with emails! Any news older than 4-20, mark as read and archive it: