194:日時から月や曜日、週を取り出す。
datetimeモジュールを用います。
>>> import datetime
>>> datetime.now
>>> now=datetime.date.today()
>>> now
datetime.date(2005, 3, 14)
>>> now.month
3
>>> now.year
2005
>>> now.day
14
>>> now.strftime("%m-%d-%y or %d%b %Y is a %A on the %d day of %B")
'03-14-05 or 14Mar 2005 is a Monday on the 14 day of March'
ISOカレンダーは3種類のタプル(ISO年、ISO週番号、ISO曜日)を返します。
>>> now.isocalendar() (2006, 28, 7)