Benji York schrieb:
Jarek Zgoda wrote:
How do I get a list of localized month names for current locale? The
first thing that came to my mind was an ugly hack:
import locale
locale.nl_langinfo(locale.MON_1)
'January'
What did you leave out? I get
Traceback (most recent call last):
Sibylle Koczian wrote:
Benji York schrieb:
Jarek Zgoda wrote:
How do I get a list of localized month names for current locale? The
first thing that came to my mind was an ugly hack:
import locale
locale.nl_langinfo(locale.MON_1)
'January'
What did you leave out?
Nothing, most
Peter Otten wrote:
Sibylle Koczian wrote:
What did you leave out?
Nothing, most likely.
I get
Traceback (most recent call last):
File pyshell#3, line 1, in -toplevel-
locale.nl_langinfo(locale.MON_1)
AttributeError: 'module' object has no attribute 'nl_langinfo'
(Python 2.4,
Jarek Zgoda wrote:
How do I get a list of localized month names for current locale? The
first thing that came to my mind was an ugly hack:
import datetime
for i in range(12):
# as I remember, all months in 2005 had 1st in days
datetime.date(2005, i + 1, 1).strftime('%B')
doesn't
Jarek Zgoda wrote:
How do I get a list of localized month names for current locale? The
first thing that came to my mind was an ugly hack:
import locale
locale.nl_langinfo(locale.MON_1)
'January'
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list