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'm currently trying to parse this string: '23.18.05'
My expectation would be that results are only valid for a setting like DATE_ORDER': 'YDM' and especially never try to parse the middle number as a year whatsoever.
It actually turns out, that you receive the following return-value with dateparser.parse: datetime.datetime(2018, 5, 23, 0, 0)
and this value with get_date_data: {'date_obj': datetime.datetime(2018, 5, 23, 0, 0), 'period': 'day', 'locale': 'it'}
(I do not think that my locale setting changes the outcome here. If any more information is needed, comments would be much appreciated.)
I would actually expect to get "None" as a result with such a string when no settings are given, especially as there are no existing date formats, where the year is found in the middle. Maybe I'm actually using it wrong, but I think not.
Also as a little backstory (not really related to the issue) I am actually trying to parse a date off of receipts and this string was found as a possible date by my RegEx, as it was given as current time on the receipt. I could not find any documentation information about ignoring such types of strings yet, as the standard datetime-parser and dateutil-parser also do not throw any errors with such a string here.
Thank you for the marking. It actually represents the weirdest time-string i've seen around ever yet, being spaced by dots. Don't really know who'd ever get the idea to space his timestamps with dots on receipts... 😆
Activity
Gallaecio commentedon Jun 3, 2020
Marking as a bug as I don’t see a way to prevent that number from being parsed as a date (which does not necessarily mean that there isn’t one).
Gallaecio commentedon Jun 3, 2020
On an unrelated note, if it’s not a date, what does that number stand for in the source string?
StefanS111 commentedon Jun 3, 2020
Thank you for the marking. It actually represents the weirdest time-string i've seen around ever yet, being spaced by dots. Don't really know who'd ever get the idea to space his timestamps with dots on receipts... 😆
Gallaecio commentedon Jun 14, 2020
Looks like
REQUIRE_PARTS, introduced in 0.7.5, does not make a difference either: