Skip to content

Commit e53a534

Browse files
committed
Fixed date parser error
1 parent 3f56f92 commit e53a534

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

whyqd/parsers/datasource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ def _date_is_isoformat(self, x: str) -> bool:
631631
https://stackoverflow.com/a/61569783
632632
"""
633633
try:
634-
datetime.fromisoformat(str(x).replace('Z', '+00:00'))
634+
# `int` formatted dates will fail with `AttributeError`
635+
datetime.fromisoformat(x.replace('Z', '+00:00'))
635636
except (ValueError, TypeError, AttributeError):
636637
return False
637638
return True

0 commit comments

Comments
 (0)