From 1c8e84eca335a1cd8f1e072627e6bd41897693c4 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Wed, 31 May 2023 09:00:52 +0200 Subject: [PATCH] fix: fix months discrimination (monicahq/chandler#560) --- .../Web/ViewHelpers/VaultLifeMetricsViewHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domains/Vault/ManageLifeMetrics/Web/ViewHelpers/VaultLifeMetricsViewHelper.php b/app/Domains/Vault/ManageLifeMetrics/Web/ViewHelpers/VaultLifeMetricsViewHelper.php index 690eb0a82bd..87aed403a0c 100644 --- a/app/Domains/Vault/ManageLifeMetrics/Web/ViewHelpers/VaultLifeMetricsViewHelper.php +++ b/app/Domains/Vault/ManageLifeMetrics/Web/ViewHelpers/VaultLifeMetricsViewHelper.php @@ -59,7 +59,7 @@ public static function dto(LifeMetric $lifeMetric, int $year, Contact $contact): $maxNumberOfEvents = $eventsCounter; } - $date = CarbonImmutable::now()->month($month)->day(1); + $date = CarbonImmutable::now()->day(1)->month($month); $eventsInMonthCollection->push([ 'id' => $month, 'friendly_name' => DateHelper::formatMonthNumber($date),