From 2db778c4a4a5e03a106b132a452e4b14eb1b86c3 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 14 Nov 2022 16:16:38 +0100 Subject: [PATCH] fix chill-bundles#25 RollingDate bad expression --- .../Export/Filter/EvaluationFilters/ByEndDateFilter.php | 2 +- .../Export/Filter/EvaluationFilters/ByStartDateFilter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php index 1f14b04ac..2dd9192bd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php @@ -58,7 +58,7 @@ class ByEndDateFilter implements FilterInterface $builder ->add('start_date', PickRollingDateType::class, [ 'label' => 'start period date', - 'data' => new RollingDate(RollingDate::T_TODAY, new DateTimeImmutable('1 year ago')), + 'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'input' => 'datetime_immutable', ]) ->add('end_date', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php index 000f3447e..95314708f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php @@ -58,7 +58,7 @@ class ByStartDateFilter implements FilterInterface $builder ->add('start_date', PickRollingDateType::class, [ 'label' => 'start period date', - 'data' => new RollingDate(RollingDate::T_TODAY, new DateTimeImmutable('1 year ago')), + 'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'input' => 'datetime_immutable', ]) ->add('end_date', PickRollingDateType::class, [