maebert/jrnl — pull request #133 by MinchinWeb (2014-02-07 18:03:05+00:00)
Title: Parse dates improvements

Parsing dates still does many weird things, but this will fix one of them...

By adding the `end_flag` parameter to `parse_date()`, this allows a more useful definition of dates when searching entries.

e.g. `jrnl -from today -to today`
**Old behavior**: entries from `2014-02-07 9:00` to `2014-02-07 9:00` (actual time might vary based on your local settings, but the point is the two times are the same)
**New behavior**: entries from `2014-02-07 0:00` to `2014-02-07 23:59:59`, so you'll actually get any entries written today.

New entries without a time are still added at the default time, as per the configuration settings.

*Remaining issues*:
* `jrnl -from january -to january` -> entries from `2014-01-01 0:00` to `2014-01-01 23:59:59`, so basically entries on January 1. I would like it to give entries from `2014-01-01 0:00` to `2014-01-31 23:59:59`.
* I would like the same thing to work when given years (i.e. `jrnl -from 2014 -to 2014`)
* right now, dates of the form `2014`, `2014-06`, and `2014-06-08` are returned as the current date and time, but in UTC. However, `2014-06-08 12:34` works as expected. I think this is a problem with something upstream from *jrnl*.

The first two commits (cac0b72 and 24a5712) are actually part of my [earlier pull request](https://github.com/maebert/jrnl/pull/132).

Travis-CI failed because it couldn't download `argparse` for the Python 2.6 test (odd...).