Skip to content

Commit

Permalink
Fix checkDOBFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrsyz committed Dec 29, 2023
1 parent 9c84a67 commit 62bf3dd
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 62bf3dd

Please sign in to comment.