-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,7 +151,7 @@ def translate(self, date_string, keep_formatting=False, settings=None): | |
def _translate_numerals(self, date_string): | ||
date_string_tokens = NUMERAL_PATTERN.split(date_string) | ||
for i, token in enumerate(date_string_tokens): | ||
if token.isdigit(): | ||
if token.isdecimal(): | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
noviluni
Collaborator
|
||
date_string_tokens[i] = str(int(token)).zfill(len(token)) | ||
if isinstance(date_string_tokens[i], bytes): | ||
date_string_tokens[i] = date_string_tokens[i].decode('utf-8') | ||
|
FYI this breaks compatibility with Python 2.7
You might want to either revert this change or modify the classifiers in setup.py