Help %A in time.strftime(%A)

jolly jemnader at gmail.com
Wed Dec 19 19:57:45 EST 2007


Hey guys,

I'm following a tutorial on Python and I came across this in one of
the examples.
(Toggle Plain Text)

import time

today = time.localtime(time.time())
theDate = time.strftime("%A %B %d", today)

print today
print theDate

import time today = time.localtime(time.time()) theDate =
time.strftime("%A %B %d", today) print today print theDate
Result:
(Toggle Plain Text)

(2007, 12, 20, 9, 48, 15, 3, 354, 1)
Thursday December 20

(2007, 12, 20, 9, 48, 15, 3, 354, 1) Thursday December 20

can someone explain to me the %A and the %B?

Thanks.



More information about the Python-list mailing list