summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-02 04:49:03 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-02 04:49:03 -0400
commita2ed6bc95d3d7d6c51ca3f65579b30cfca42d3e6 (patch)
treede125c610c91a8cc48f90398850c704523cd8326 /src/times.cc
parent5d214e515f38c68faf65b2200e1c00f5a1b0b734 (diff)
downloadfork-ledger-a2ed6bc95d3d7d6c51ca3f65579b30cfca42d3e6.tar.gz
fork-ledger-a2ed6bc95d3d7d6c51ca3f65579b30cfca42d3e6.tar.bz2
fork-ledger-a2ed6bc95d3d7d6c51ca3f65579b30cfca42d3e6.zip
Patched some date-sensitive tests
Diffstat (limited to 'src/times.cc')
-rw-r--r--src/times.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/times.cc b/src/times.cc
index 7ddc7bd4..c3b5009d 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -97,7 +97,7 @@ namespace {
if (result.tm_year == -1) {
result.tm_year = (year == -1 ? int(CURRENT_DATE().year()) : year) - 1900;
- if (result.tm_mon > (CURRENT_DATE().month() - 1))
+ if (year == -1 && result.tm_mon > (CURRENT_DATE().month() - 1))
result.tm_year--;
}