MycroftAI / lingua-franca

Mycroft's multilingual text parsing and formatting library
Apache License 2.0
75 stars 79 forks source link

extract_datetime_en() clobbers any additional datetimes in string #72

Open ChanceNCounter opened 4 years ago

ChanceNCounter commented 4 years ago
>>> parse.extract_datetime("september 30 2019 october 24th 2018")
[datetime.datetime(2018, 10, 24, 0, 0, tzinfo=tzlocal()), '']

Desirable output would be:

[datetime.datetime(2018, 10, 24, 0, 0, tzinfo=tzlocal()), 'september 30 2019']

It might be worth adding an extract_datetimes() function while fixing this, or the patcher could regard that as out of scope. They're the same problem space, this bug prevents that potential feature.

JarbasAl commented 4 years ago

96 hopefully closes this once finished