From a891200e4c06baf5e1870d2777cc418397761169 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 3 Sep 2025 09:22:13 +0300 Subject: removal of dead code --- foostats.pl | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/foostats.pl b/foostats.pl index 03dc915..d449b09 100644 --- a/foostats.pl +++ b/foostats.pl @@ -113,25 +113,7 @@ package DateHelper { return @dates; } - # Sub: last_n_months_day_dates - # - Purpose: Return all day dates from N months ago (month start) up to today. - # - Params: $months (int) number of months to look back. - # - Return: list of YYYYMMDD strings, oldest to newest. - sub last_n_months_day_dates ($months) { - my $today = localtime; - my $start_year = $today->year; - my $start_month = $today->mon - $months; - while ($start_month <= 0) { $start_month += 12; $start_year--; } - - my $start = Time::Piece->strptime(sprintf('%04d-%02d-01', $start_year, $start_month), '%Y-%m-%d'); - my @dates; - my $t = $start; - while ($t <= $today) { - push @dates, $t->strftime('%Y%m%d'); - $t += 24 * 60 * 60; # one day - } - return @dates; - } + } # Package: Foostats::Logreader — parse and normalize logs -- cgit v1.2.3