Closed tomasr8 closed 1 month ago
@akx Let me know if this is worth fixing, happy to send a PR :)
@tomasr8 It definitely is worth fixing if a CLDR preset entry does this! We should also probably add more smoke tests to test all of the CLDR presets..?
We should also probably add more smoke tests to test all of the CLDR presets..?
That would definitely be nice! I bet there are a lot of surprises lurking in some less used parts/locales of CLDR :smile:
Overview Description
parse_time
raises aValueError
when the given time format doesn't contain seconds e.g.H:mm
.Steps to Reproduce
This happens because the
parse_time
function expects the format to have seconds, but some locales do not have those. For example this is the CLDR definition for theshort
format in Czech:I think the obvious fix is to make the seconds optional and default to zero.