Skip to content

Commit

Permalink
Merge pull request #1279 from gigne/main
Browse files Browse the repository at this point in the history
Fix checkDOBFormat
  • Loading branch information
Gellipapa authored Jan 18, 2024
2 parents 0233de4 + 62bf3dd commit 48dedbb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions [core]/esx_identity/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ local function checkDOBFormat(str)
if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then
return false
elseif m == 4 or m == 6 or m == 9 or m == 11 then
return d < 30
return d <= 30
elseif m == 2 then
if y % 400 == 0 or (y % 100 ~= 0 and y % 4 == 0) then
return d < 29
return d <= 29
else
return d < 28
return d <= 28
end
else
return d < 31
return d <= 31
end
end

Expand Down

0 comments on commit 48dedbb

Please sign in to comment.