python-datetime

Parse this date in Python: 5th November 2010

I'm having a bad time with date parsing and formatting today. Points for somebody who can parse this date format into a datetime.date or datetime.datetime (I'm not too fussy but I'd prefer .date): 5th November 2010 ...

User specified date time

I need to parse a date/time string from user input, and convert to UTC based on timzeone info not available in the string for datetime.strptime() (any suggestions?). Is there a straightforward way of doing this? Ideally, on google app engine i'd like to grab local time with tzinfo from the browser if possible also. timezone_string = ...

Creating and rendering structure with years and months in django

In my blogging app I need a structure (created as a variable in context processor) that will store months number and corresponding year of 5 consecutive months till current one. So if current month is december, we will have year: 2010 and months: 12,11,10,9,8. If month will be january we will have years 2010: months: 1 and years: 2009 mo...