Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: filters/humanize_date.py

Issue 29334171: Issue 3410 - Added date sort / format for press releases (Closed)
Patch Set: Fixed datetime call Created Feb. 9, 2016, 4 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « filters/datesort.py ('k') | filters/teamsort.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filters/humanize_date.py
diff --git a/filters/humanize_date.py b/filters/humanize_date.py
new file mode 100644
index 0000000000000000000000000000000000000000..4cc9576d34ede1df184ad0edf47958df18baa5dc
--- /dev/null
+++ b/filters/humanize_date.py
@@ -0,0 +1,4 @@
+from datetime import datetime
+
+def humanize_date(date):
+ return datetime.strptime(date, "%Y-%m-%d").strftime("%B %d, %Y")
« no previous file with comments | « filters/datesort.py ('k') | filters/teamsort.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld