fix: correctly compare age range
This commit is contained in:
1 parent
00803b2e73
commit
e38445f184
1 file changed
+1
-1
@@ -92,7 +92,7 @@ class ParticipantEligibilityService
|
|||||||
|
|
||||||
$travelStartDate = CarbonImmutable::instance($bookingDto->travel->dateFrom);
|
$travelStartDate = CarbonImmutable::instance($bookingDto->travel->dateFrom);
|
||||||
$birthDate = CarbonImmutable::instance($participant->dateOfBirth);
|
$birthDate = CarbonImmutable::instance($participant->dateOfBirth);
|
||||||
$ageAtTravelStart = $birthDate->diffInYears($travelStartDate);
|
$ageAtTravelStart = (int) $birthDate->diffInYears($travelStartDate);
|
||||||
$birthYear = (int) $birthDate->format('Y');
|
$birthYear = (int) $birthDate->format('Y');
|
||||||
|
|
||||||
$constraintType = $service->ageConstraintType ?? 'absolute_age';
|
$constraintType = $service->ageConstraintType ?? 'absolute_age';
|
||||||
|
|||||||
Reference in new issue
Block a user