Re: Localized month names?

2006-03-14 Thread Sibylle Koczian
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):

Re: Localized month names?

2006-03-14 Thread Peter Otten
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

Re: Localized month names?

2006-03-14 Thread Kent Johnson
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,

Re: Localized month names?

2006-03-13 Thread Fredrik Lundh
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

Re: Localized month names?

2006-03-13 Thread Benji York
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