diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-10-12 17:46:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-12 17:46:21 (GMT) |
commit | c05f9dde8a12dfd63d3ade93da616042df2dc925 (patch) | |
tree | 7fbcd2b9ec611130e746c12b27cebd816cab45a1 /Lib/statistics.py | |
parent | dcd58c50844dae0d83517e88518a677914ea594b (diff) | |
download | cpython-c05f9dde8a12dfd63d3ade93da616042df2dc925.zip cpython-c05f9dde8a12dfd63d3ade93da616042df2dc925.tar.gz cpython-c05f9dde8a12dfd63d3ade93da616042df2dc925.tar.bz2 |
gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946)
In some locales (like French or Hebrew) the full or abbreviated names of
the default month and weekday used in __calc_date_time can be part of
other name or constant part of the %c format. The month name can also
match %m with constant suffix (like in Japanese). So the code failed to
correctly distinguish formats %a, %A, %b, %B and %m.
Cycle all month and all days of the week to find the variable part
and distinguish %a from %A and %b from %B or %m.
Fixed locales for the following languges:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.
Co-authored-by: Eli Bendersky <eliben@gmail.com>
Diffstat (limited to 'Lib/statistics.py')
0 files changed, 0 insertions, 0 deletions