comtravo / ctparse

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

Interpretation of two-digit years #56

Closed sebastianmika closed 5 years ago

sebastianmika commented 5 years ago

When trying to parse something like 19.10.93 the result is in 2093 - even when setting the reference time to be before 1993. This is due to how ruleDDMMYYYY handles two digit years. It should probably not "hard move" them to the 21st century but rather use some cutoff year within the century of the reference time.

This is how Excel handles this: https://docs.microsoft.com/en-us/office/troubleshoot/excel/two-digit-year-numbers

Suggestion: