Open kutera opened 3 years ago
Well, you can use the PARSERS
setting to disable the relative parser.
Whether STRICT_PARSING
should have prevented this to work, I’m unsure, although I’m slightly inclined towards your interpretation (if there is no year or month set explicitly and STRICT_PARSING
is True
, no date should be parsed).
Thanks, this workaround solved my cases.
I added REQUIRE_PARTS too.
search.search_dates('90 days',settings={'REQUIRE_PARTS': ['day', 'month', 'year'], 'PARSERS':['absolute-time',]})
As part of the last point here: https://github.com/scrapinghub/dateparser/issues/796 (which I'm working on), I will add notes in the docs regarding what parser are affected by each setting.
BHello, The STRICT_PARSING use is not so easy to understand. Example with release 1.0.0
Same issue with search :
I expected None result Or is it another solution to avoid relative date results ? Only if day, month and year are found.
Best Regards