Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have GetAge() return -1 if Year is null, and fix return type #6888

Merged
5 changes: 4 additions & 1 deletion src/CSVImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,11 @@ function ParseDate(string $sDate, int $iDateMode): array
return $aDate;
}

function GetAge($Month, $Day, $Year): bool
function GetAge($Month, $Day, $Year): int
{
if ($Year == null) {
return -1;
}
if ($Year > 0) {
if ($Year == date('Y')) {
return 0;
Expand Down
Loading