python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 432 forks source link

parse functions should support a custom format #1090

Open DetachHead opened 1 week ago

DetachHead commented 1 week ago

the babel.dates.format_time and format_date functions support a custom format using LDML syntax. it would be nice if the parse_time and parse_date functions supported it too.

my use case is that i need to parse a time from a string. i don't know what format it will be at runtime, but the LDML format value will be available.