Skip to content

Commit

Permalink
Update README.md to clarify time-based filters
Browse files Browse the repository at this point in the history
Added an example to the README to show how the the `:before` and `:after` time-based filters work.
  • Loading branch information
JoeNyland committed Apr 11, 2016
1 parent 353ddcc commit c370524
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -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:
Expand Down

0 comments on commit c370524

Please sign in to comment.