You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking about how to improve the "debugging" process when weird things happen...
And I realized that it could be really useful to add an option to "see" what happens behind the scenes. It could be, for example, a setting called DEBUG_INFO that when True shows relevant information to help you to understand what's happening.
I was trying a little and that's what I got.
Input:
dateparser.parse('07/03/2009')
Log:
Interpretation: 07 - 03 - 2009
Order: month, day, year
Used locale: en
Out:
2009-07-03 00:00:00
Input:
dateparser.parse('2009')
Log:
Missing: Day, Month
Interpretation: 2009
Order: year
Used locale: en
Out:
2009-09-05 00:00:00
Input:
dateparser.parse('Feb 2009')
Log:
Missing: Day
Interpretation: february - 2009
Order: year
Used locale: en
Out:
2009-02-05 00:00:00
Input:
dateparser.parse('07/03/2009', locales=['fr'])
Log:
Interpretation: 07 - 03 - 2009
Order: day, month, year
Used locale: fr
Out:
2009-03-07 00:00:00
Input:
dateparser.parse('en 2 días')
Log:
Used locale: es
Out:
2019-09-07 17:46:02.653798
Of course there are a lot of new information that could appear in the log, that's just an idea.
Activity
noviluni commentedon Sep 5, 2019
I just added a draft PR with the code I used to get the
login the examples.noviluni commentedon Sep 5, 2019
It could help in some situations like this: #520 (comment)
noviluni commentedon Feb 19, 2020
I expect to continue with this PR after merging this: #603 as it would be a good starting point :)
noviluni commentedon Jun 26, 2020
Related to this: #729