Closed Lukas0907 closed 8 years ago
I would be interested in seeing what this entails and thoughts on api first before you were to code it up. few example uses would be good too. @Lukas0907
I just found out that parse_pattern()
actually does not parse a date using a pattern but just creates a pattern object. I misinterpreted that. So just ignore this issue. :)
Sometimes you want more control over the parsing process than the heuristic of dateutil's parse function can give you or you have really weird strings. Since babel is already used for formatting the output, it would be quite handy to also have the
parse_pattern()
function available: http://babel.pocoo.org/en/latest/api/dates.html#babel.dates.parse_pattern It accepts the same patterns and also a locale.I could provide a pull request if this is deemed useful.