# parse_date :: Date -> String
# e.g. parse_date("2001-12-31")
return datetime.date(*strptime(date, "%Y-%m-%d")[0:3])
# str_date :: String -> Date
Friday, 5 June 2009
Same project, different problem. This time the problem is dates and times. Specifically converting between them. These two small functions do just that.