diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-10 18:38:52 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-10 18:38:52 -0400 |
commit | e1d6c4bff27f41fbe57738205ba3548554380a73 (patch) | |
tree | 270da6408bfdbbc10787e6ca1439aa715d7a6fbe /config.cc | |
parent | e414123ecb472d1f86a2f1cfdbd2732144c20f0d (diff) | |
download | fork-ledger-e1d6c4bff27f41fbe57738205ba3548554380a73.tar.gz fork-ledger-e1d6c4bff27f41fbe57738205ba3548554380a73.tar.bz2 fork-ledger-e1d6c4bff27f41fbe57738205ba3548554380a73.zip |
interval_t objects now play nicely with python. see the bottom of main.py
Diffstat (limited to 'config.cc')
-rw-r--r-- | config.cc | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -42,7 +42,6 @@ config_t::config_t() download_quotes = false; use_cache = false; cache_dirty = false; - interval_begin = 0; } static void @@ -226,25 +225,22 @@ void config_t::process_options(const std::string& command, if (! report_interval && ! interval_text.empty()) { try { std::istringstream stream(interval_text); - std::time_t begin = -1, end = -1; - report_interval = interval_t::parse(stream, &begin, &end); - - if (begin != -1) { - interval_begin = begin; + report_interval.parse(stream); + if (report_interval.begin) { if (! predicate.empty()) predicate += "&"; char buf[32]; - std::sprintf(buf, "d>=%lu", begin); + std::sprintf(buf, "d>=%lu", report_interval.begin); predicate += buf; } - if (end != -1) { + if (report_interval.end) { if (! predicate.empty()) predicate += "&"; char buf[32]; - std::sprintf(buf, "d<%lu", end); + std::sprintf(buf, "d<%lu", report_interval.end); predicate += buf; } } |