BEGINNER: converting integer to short month name?

Erik Max Francis max at alcyone.com
Thu Apr 10 01:58:59 EDT 2003


Matt Gerrans wrote:

> Looks like it would be
>    calendar.month_abbr[ the_month + 1 ]
> 
> Interestingly, calendar.month_abbr[ 0 ] is 'Saturday'.   Hmm...

Python 2.2.2 (#2, Oct 14 2002, 17:32:20) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import calendar
>>> calendar.month_abbr[0]
''

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ If love is the answer, could you rephrase the question?
\__/ Lily Tomlin
    Official Omega page / http://www.alcyone.com/max/projects/omega/
 The official distribution page for the popular Roguelike, Omega.




More information about the Python-list mailing list