Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Fixed the wrong working with a changed order of the fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mitryp committed Feb 11, 2022
1 parent 6f3cbc7 commit aabbeb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Datify
This Python3 module allows to extract parts of valid date from user input.
This Python3 module allows extracting parts of valid date from user input.
User input is processed through class `Datify`.
## Languages supported:
- [x] English
Expand Down
4 changes: 4 additions & 0 deletions datify/datify.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def __init__(self, user_input: Optional[str] = None, year: Optional[int] = None,
if user_input:
words = _get_words_list(user_input)
if words:
for word in words:
if Datify.is_alpha_month(word):
self.set_month(word)

for word in words:
if self.day_first:
if self.is_day(word) and not self.day:
Expand Down

0 comments on commit aabbeb6

Please sign in to comment.