-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes date-time formatting, adds decode_datetime
`Net::IMAP.format_datetime` was previously using an incorrect `date-time` format (see the `Net::IMAP::STRFDATE` rdoc). I don't know if anyone actually *uses* `format_datetime`, but fixing the bug isn't backwards compatible. I implemented the correct behavior under a different method name (and an alias). The existing method keeps its original behavior (for now), with a warning that it will be fixed in a future version. Also: * adds "date" gem as a dependency * adds `{format,parse}_date` methods. * updates `send_data` * adds `Date` handling. This can be used by `SEARCH`. * uses `encode_datetime` from `send_time_data` (reduces duplication) * adds aliases * `format_*` => `encode_*` * `parse_*` => `decode_*` * `encode_time` => `encode_datetime` * but `decode_time` returns a Time object
- Loading branch information
Showing
4 changed files
with
143 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters