Sunday, February 1, 2009

day[32]

Uh-oh, now that January is over, I have to manually keep track of which day of the year it is...



>>> import datetime
>>> datetime.datetime.now().strftime("%j")
'032'

...thankfully Python makes this a ridiculously easy task

No comments:

Post a Comment