Hi,
I am testing dateparser and it seems that it may not work in some cases if the string containing the date contains additional words.
In the following example, I added the term "fr" to the string (randomly chosen), and tested DateDataParser in Spanish and English. While the latter worked, the former did not.
After searching a bit more I realised that you state
The input string it's a valid date and it doesn't contain any other words or numbers.
I understand this if no format is given. However, if a format is given, where the added word is included (like in the example), perhaps it should work?
For now I'll be using:
from datetime import datetime
import locale
locale.setlocale(locale.LC_TIME, "es_ES")
dt = "fr 18 Mayo 2021"
datetime.strptime(dt, "fr %d %B %Y")
Hi, I am testing
dateparser
and it seems that it may not work in some cases if the string containing the date contains additional words.In the following example, I added the term "fr" to the string (randomly chosen), and tested
DateDataParser
in Spanish and English. While the latter worked, the former did not.Spanish
IN
OUT
English
IN
OUT
Any thoughts on this? I am using v1.0.0
UPDATE
After searching a bit more I realised that you state
I understand this if no format is given. However, if a format is given, where the added word is included (like in the example), perhaps it should work?
For now I'll be using: