summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/output.cc13
-rw-r--r--src/output.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/src/output.cc b/src/output.cc
index fc919d21..e314d5da 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -88,17 +88,14 @@ void gather_statistics::flush()
{
std::ostream& out(report.output_stream);
- out << "Statistics gathered for this report:" << std::endl;
-
- out << std::endl << " Time period: "
- << statistics.earliest_xact << " to "
+ out << "Time period: " << statistics.earliest_xact << " to "
<< statistics.latest_xact << std::endl << std::endl;
out << " Files these transactions came from:" << std::endl;
- bool first = true;
foreach (const path& pathname, statistics.filenames)
- out << " " << pathname.string() << std::endl;
+ if (! pathname.empty())
+ out << " " << pathname.string() << std::endl;
out << std::endl;
out << " Unique payees: ";
@@ -119,7 +116,7 @@ void gather_statistics::flush()
out << " (";
out.precision(2);
- out << (double(statistics.unique_dates.size()) /
+ out << (double((statistics.latest_xact - statistics.earliest_xact).days()) /
double(statistics.total_xacts)) << " per day)" << std::endl;
out << " Days since last xact: ";
@@ -158,8 +155,6 @@ void gather_statistics::operator()(xact_t& xact)
date_t date = xact.reported_date();
- statistics.unique_dates.insert(date);
-
if (date.year() == CURRENT_DATE().year() &&
date.month() == CURRENT_DATE().month())
statistics.total_this_month++;
diff --git a/src/output.h b/src/output.h
index 31214d29..fad05857 100644
--- a/src/output.h
+++ b/src/output.h
@@ -105,7 +105,6 @@ protected:
std::set<string> accounts_referenced;
std::set<string> payees_referenced;
- std::set<date_t> unique_dates;
statistics_t()
: total_entries(0), total_xacts(0), total_uncleared_xacts(0),