From 762353945a744ae4b89970b9e08c2c22a52ddbff Mon Sep 17 00:00:00 2001 From: Ian2020 Date: Wed, 29 Nov 2023 13:12:24 +0000 Subject: Add new --align-intervals option. --- src/filters.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/filters.cc') diff --git a/src/filters.cc b/src/filters.cc index 3acb5624..b5b7fb19 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -974,7 +974,7 @@ void interval_posts::operator()(post_t& post) if (interval.duration) { all_posts.push_back(&post); } - else if (interval.find_period(post.date())) { + else if (interval.find_period(post.date(), align_intervals)) { item_handler::operator()(post); } } @@ -991,10 +991,10 @@ void interval_posts::flush() sort_posts_by_date()); // only if the interval has no start use the earliest post - if (!(interval.begin() && interval.find_period(*interval.begin()))) + if (!(interval.begin() && interval.find_period(*interval.begin(), align_intervals))) // Determine the beginning interval by using the earliest post if (all_posts.size() > 0 && all_posts.front() - && !interval.find_period(all_posts.front()->date())) + && !interval.find_period(all_posts.front()->date(), align_intervals)) throw_(std::logic_error, _("Failed to find period for interval report")); // Walk the interval forward reporting all posts within each one -- cgit v1.2.3