]> git.ipfire.org Git - thirdparty/babel.git/commit
Add format argument to parse_* 834/head
authorJuliette Monsel <j_4321@protonmail.com>
Sat, 20 Jul 2019 17:19:12 +0000 (19:19 +0200)
committerAarni Koskela <akx@iki.fi>
Fri, 28 Jan 2022 09:07:09 +0000 (11:07 +0200)
commit8a5e4bdb7f40bfbd8f6f0f6f22479e6f0f190da1
tree30b7e99b81cb215c2a7a117e4430e8f7cbe930b8
parent335884add64c6317ea74d1362ace6f79e449dfd7
Add format argument to parse_*

``parse_date()`` does not allow the user to specify the date's format
and the 'medium' format is used by default in the call to
``get_date_format()`` on line 1144.

This results in a failure to parse the date in short format for the
locale 'sv_SE'. This commit adds the format argument to avoid this
failure. The default value is set to 'medium' to preserve the old behavior.

Fixes #657

Co-authored-by: Aarni Koskela <akx@iki.fi>
babel/dates.py
tests/test_dates.py