BEGINNER: converting integer to short month name?

Matt Gerrans mgerrans at mindspring.com
Thu Apr 10 07:40:55 CEST 2003


>     [ 'Dec','Jan','Feb','Mar', ... ] [ the_month ]
>
> or
>
>     import calendar
>     calendar.month_abbr[ the_month ]

Looks like it would be
   calendar.month_abbr[ the_month + 1 ]

Interestingly, calendar.month_abbr[ 0 ] is 'Saturday'.   Hmm...







More information about the Python-list mailing list