From d43cef21f12569f31f99ad532f68971f95655503 Mon Sep 17 00:00:00 2001 From: Pascale Beier Date: Thu, 31 Oct 2024 23:36:57 +0100 Subject: [PATCH] fix: Mitigate Carbon Month Overflow Bug --- .../Constraints/DateConstraint/Operators/IsMonthOperator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tables/src/Filters/QueryBuilder/Constraints/DateConstraint/Operators/IsMonthOperator.php b/packages/tables/src/Filters/QueryBuilder/Constraints/DateConstraint/Operators/IsMonthOperator.php index 93bc6f44f10..a90ee253569 100644 --- a/packages/tables/src/Filters/QueryBuilder/Constraints/DateConstraint/Operators/IsMonthOperator.php +++ b/packages/tables/src/Filters/QueryBuilder/Constraints/DateConstraint/Operators/IsMonthOperator.php @@ -56,7 +56,7 @@ protected function getMonths(): array { return collect(range(1, 12)) ->mapWithKeys(fn (int $month): array => [ - $month => now()->setMonth($month)->getTranslatedMonthName(), + $month => now()->setMonth($month)->setDay(1)->getTranslatedMonthName(), ]) ->all(); }