comtravo / ctparse

Parse natural language time expressions in python
https://www.comtravo.com
MIT License
131 stars 24 forks source link

Intervals of the kind "ab dem xx.xx.xx-xx.xx.xx" parsed incorrectly #99

Closed gabrielelanaro closed 2 years ago

gabrielelanaro commented 4 years ago

Description

>>> ctparse.ctparse("ab dem 11.05.20-15.05.20")
CTParse(2020-05-11 X:X (X/X) - None, (135, 100, 126, 136, 126, 'ruleDDMMYYYY', 'ruleAbsorbOnTime', 'ruleAfterTime', 'ruleDDMMYYYY'), 14.872431305790162)
sebastianmika commented 2 years ago

Parses correctly in 3.0.2:

In [12]: ctparse("ab dem 11.05.20-15.05.20")
Out[12]: CTParse(2020-05-11 X:X (X/X) - 2020-05-15 X:X (X/X), (136, 100, 126, 137, 126, 'ruleDDMMYYYY', 'ruleDDMMYYYY', 'ruleDateDate'), -118.35472817468437)