diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-28 18:27:12 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:32 -0400 |
commit | f9b874e1cbbbf8f64699379009e70d849da1fcf1 (patch) | |
tree | ca4c874a1b67051cc84efa3a035e311377d46257 /datetime.cc | |
parent | 5a93d4819e5fc753352618b729e0fe45532166b9 (diff) | |
download | fork-ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.tar.gz fork-ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.tar.bz2 fork-ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.zip |
Added elision styles.
Diffstat (limited to 'datetime.cc')
-rw-r--r-- | datetime.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/datetime.cc b/datetime.cc index d8668cb8..2e47c554 100644 --- a/datetime.cc +++ b/datetime.cc @@ -253,6 +253,12 @@ void interval_t::parse(std::istream& in) months = 3 * quantity; else if (word == "years") years = quantity; + else if (word == "hours") + hours = quantity; + else if (word == "minutes") + minutes = quantity; + else if (word == "seconds") + seconds = quantity; } else if (word == "day") days = 1; @@ -264,6 +270,12 @@ void interval_t::parse(std::istream& in) months = 3; else if (word == "year") years = 1; + else if (word == "hour") + hours = 1; + else if (word == "minute") + minutes = 1; + else if (word == "second") + seconds = 1; } else if (word == "daily") days = 1; @@ -279,6 +291,8 @@ void interval_t::parse(std::istream& in) months = 3; else if (word == "yearly") years = 1; + else if (word == "hourly") + hours = 1; else if (word == "this" || word == "last" || word == "next") { parse_date_words(in, word, &begin, &end); } |