8366: February 29th invalid date in Julian dual-dated leap year
This commit is contained in:
parent
ed8807f73a
commit
b4fed8101a
@ -618,12 +618,11 @@ class DateParser:
|
|||||||
y = self._get_int(groups[0])
|
y = self._get_int(groups[0])
|
||||||
m = self._get_int(groups[3])
|
m = self._get_int(groups[3])
|
||||||
d = self._get_int(groups[4])
|
d = self._get_int(groups[4])
|
||||||
if check and not check((d, m, y)):
|
if groups[2] and julian_valid((d, m, y + 1)): # slash year digit
|
||||||
return Date.EMPTY
|
|
||||||
if groups[2]: # slash year digit
|
|
||||||
return (d, m, y + 1, True)
|
return (d, m, y + 1, True)
|
||||||
else:
|
if check is None or check((d, m, y)):
|
||||||
return (d, m, y, False)
|
return (d, m, y, False)
|
||||||
|
return Date.EMPTY
|
||||||
|
|
||||||
# Database datetime format, used in ex. MSSQL
|
# Database datetime format, used in ex. MSSQL
|
||||||
# YYYYMMDD HH:MM:SS or YYYYMMDD or YYYYMMDDHHMMSS
|
# YYYYMMDD HH:MM:SS or YYYYMMDD or YYYYMMDDHHMMSS
|
||||||
|
Loading…
Reference in New Issue
Block a user