The print command now honors use of --date-format
This commit is contained in:
parent
c645ac1de7
commit
0f3e7e3e7f
1 changed files with 10 additions and 3 deletions
13
src/print.cc
13
src/print.cc
|
|
@ -71,11 +71,18 @@ namespace {
|
|||
|
||||
void print_xact(report_t& report, std::ostream& out, xact_t& xact)
|
||||
{
|
||||
format_type_t format_type = FMT_WRITTEN;
|
||||
optional<const char *> format;
|
||||
|
||||
if (report.HANDLED(date_format_)) {
|
||||
format_type = FMT_CUSTOM;
|
||||
format = report.HANDLER(date_format_).str().c_str();
|
||||
}
|
||||
|
||||
out << format_date(item_t::use_effective_date ?
|
||||
xact.date() : xact.actual_date(),
|
||||
FMT_WRITTEN);
|
||||
xact.date() : xact.actual_date(), format_type, format);
|
||||
if (! item_t::use_effective_date && xact.effective_date())
|
||||
out << '=' << format_date(*xact.effective_date(), FMT_WRITTEN);
|
||||
out << '=' << format_date(*xact.effective_date(), format_type, format);
|
||||
out << ' ';
|
||||
|
||||
out << (xact.state() == item_t::CLEARED ? "* " :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue