https://github.com/wroberts/pytimeparse Remove the commented-out month and year. Add to TIMEFORMATS a new one including year and month Replace MULTIPLIERS with precalculated values. Update regex of year, month, and week to also include decimal