From 09396f8c98176793061cf74a47ccf59b54d3a72c Mon Sep 17 00:00:00 2001 From: Riccardo Di Dato Date: Sun, 25 Sep 2022 13:55:59 +0200 Subject: [PATCH] Stats --- app/private/bin/convertStatsQuick.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/private/bin/convertStatsQuick.php b/app/private/bin/convertStatsQuick.php index 661f75d..32a229d 100755 --- a/app/private/bin/convertStatsQuick.php +++ b/app/private/bin/convertStatsQuick.php @@ -237,6 +237,7 @@ function getMonthlyPageImpressionsPipeline($startDate, $endDate) { ]; } +$curYear = intval(date("Y")); for ($y = 2016; $y <= intval(date("Y")); $y++) { echo "Working on year : $y", PHP_EOL; @@ -290,7 +291,7 @@ for ($y = 2016; $y <= intval(date("Y")); $y++) { } - if ($y == 2022) { + if ($y == $curYear) { $pipe = getDailyNotiziaImpressionsPipeline( $from, $to ); } else {