Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 import datetime, copy | 1 from datetime import datetime |
Sebastian Noack
2016/02/04 11:05:06
The import for the "copy" module isn't necessary a
juliandoucette
2016/02/04 11:18:39
Done. Good catch.
| |
2 | 2 |
3 def humanize_date(date): | 3 def humanize_date(date): |
4 return datetime.datetime.strftime( | 4 return datetime.strptime(date, "%Y-%m-%d").strftime("%B %d, %Y") |
Sebastian Noack
2016/02/04 11:05:06
Simply, call methods on the instance itself, not o
juliandoucette
2016/02/04 11:18:39
Done. I was copying the style of the previous date
| |
5 datetime.datetime.strptime(date, "%Y-%m-%d"), | |
6 "%B %d, %Y") | |
LEFT | RIGHT |