summaryrefslogtreecommitdiff
path: root/constraint.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-07-30 21:57:02 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-07-30 21:57:02 -0400
commit94e76ae87e883291d13320738fe165c7a2a2415b (patch)
treeb90eff2ee3737ecdfea96dbee52ecd239fcb2578 /constraint.cc
parent5087a60deef7c618a07562511e9a1fbf2414776c (diff)
downloadfork-ledger-94e76ae87e883291d13320738fe165c7a2a2415b.tar.gz
fork-ledger-94e76ae87e883291d13320738fe165c7a2a2415b.tar.bz2
fork-ledger-94e76ae87e883291d13320738fe165c7a2a2415b.zip
two major changes
Complete changed the way format strings are handled. They are now compiled first, which is far more efficient than what was being done before. Also, there is now a global ledger::commodity_t::commodities map, which saves me from having to pass the current journal around to a zillion different functions, for the sole purpose of making sure that all commodity symbols that are parsed refer to the same commodity object.
Diffstat (limited to 'constraint.cc')
-rw-r--r--constraint.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/constraint.cc b/constraint.cc
index 4720e62b..fe00f4d2 100644
--- a/constraint.cc
+++ b/constraint.cc
@@ -93,10 +93,10 @@ bool matches(const masks_list& regexps, const std::string& str,
bool constraints_t::matches_date_range(const std::time_t date) const
{
- if (have_beginning && difftime(date, begin_date) < 0)
+ if (begin_date != -1 && difftime(date, begin_date) < 0)
return false;
- if (have_ending && difftime(date, end_date) >= 0)
+ if (end_date != -1 && difftime(date, end_date) >= 0)
return false;
if (have_date_mask) {