summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-05-22 22:04:26 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-05-22 22:04:26 -0400
commitc645ac1de7b7b492eb9096e1a16937c9d3539795 (patch)
tree0ee7349d1ba58364f077fa9abb9315698f51448d /src/times.cc
parent449d62d81269edf674256298a32962c6ee580d60 (diff)
downloadfork-ledger-c645ac1de7b7b492eb9096e1a16937c9d3539795.tar.gz
fork-ledger-c645ac1de7b7b492eb9096e1a16937c9d3539795.tar.bz2
fork-ledger-c645ac1de7b7b492eb9096e1a16937c9d3539795.zip
If FMT_CUSTOM is given, and no format, use FMT_PRINTED
Diffstat (limited to 'src/times.cc')
-rw-r--r--src/times.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/times.cc b/src/times.cc
index 00be1d3b..35082f51 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -1471,7 +1471,7 @@ std::string format_datetime(const datetime_t& when,
if (format_type == FMT_WRITTEN) {
return written_datetime_io->format(when);
}
- else if (format_type == FMT_CUSTOM || format) {
+ else if (format_type == FMT_CUSTOM && format) {
datetime_io_map::iterator i = temp_datetime_io.find(*format);
if (i != temp_datetime_io.end()) {
return (*i).second->format(when);
@@ -1497,7 +1497,7 @@ std::string format_date(const date_t& when,
if (format_type == FMT_WRITTEN) {
return written_date_io->format(when);
}
- else if (format_type == FMT_CUSTOM || format) {
+ else if (format_type == FMT_CUSTOM && format) {
date_io_map::iterator i = temp_date_io.find(*format);
if (i != temp_date_io.end()) {
return (*i).second->format(when);