Eryk Sun <[email protected]> added the comment:
The result from strftime is platform dependent. In Windows, the result has a
trailing "." for the abbreviated names that are less than four characters, but
no "de" in either form:
>>> months = [(2019, m) + (0,)*7 for m in range(1,13)]
>>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8')
'ca_ES.utf8'
>>> print(*(time.strftime('%b|%B', m) for m in months), sep='\n')
gen.|gener
febr.|febrer
març|març
abr.|abril
maig|maig
juny|juny
jul.|juliol
ag.|agost
set.|setembre
oct.|octubre
nov.|novembre
des.|desembre
In Linux, the result uses the same base abbreviations as in Windows, including
the trailing ".", but it also includes "de" or "d'" in both forms:
>>> months = [(2019, m) + (0,)*7 for m in range(1,13)]
>>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8')
'ca_ES.utf8'
>>> print(*(time.strftime('%b|%B', m) for m in months), sep='\n')
de gen.|de gener
de febr.|de febrer
de març|de març
d’abr.|d’abril
de maig|de maig
de juny|de juny
de jul.|de juliol
d’ag.|d’agost
de set.|de setembre
d’oct.|d’octubre
de nov.|de novembre
de des.|de desembre
----------
nosy: +eryksun
resolution: -> third party
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38220>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com