scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.56k stars 465 forks source link

Support for parsing fractional minutes #1186

Open daveisfera opened 1 year ago

daveisfera commented 1 year ago

Writing the minutes with a fractional value rather than writing out seconds is not a common way to specify time, but it does happen

Here's an example:

>>> import dateparser
>>> dateparser.parse("9/11/2023 03:25.5")
>>> 

For what it's worth, python-dateutil support parsing it:

>>> from dateutil.parser import parse as parse_date
>>> parse_date("9/11/2023 03:25.5")
datetime.datetime(2023, 9, 11, 3, 25, 30)
nots1dd commented 1 year ago

Hey I would like to be assigned this task as I believe I have a possible solution to this, without using dateutil library of course.

Gallaecio commented 1 year ago

Feel free to open a PR, no need to get assigned.