fix: correctly compare age range

This commit is contained in:
Björn Fromme
2026-03-16 12:02:28 +01:00
parent fba3becb06
commit f849d67a79
@@ -92,7 +92,7 @@ class ParticipantEligibilityService
$travelStartDate = CarbonImmutable::instance($bookingDto->travel->dateFrom);
$birthDate = CarbonImmutable::instance($participant->dateOfBirth);
$ageAtTravelStart = $birthDate->diffInYears($travelStartDate);
$ageAtTravelStart = (int) $birthDate->diffInYears($travelStartDate);
$birthYear = (int) $birthDate->format('Y');
$constraintType = $service->ageConstraintType ?? 'absolute_age';