Created
October 21, 2011 21:09
-
-
Save timbroder/1304985 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#normalize data for output | |
for entry in feed.entry: | |
#get link for template | |
entry.my_link = entry.link[0].href | |
#id for links | |
entry.my_id = curr_id | |
curr_id -= 1 | |
#format published date | |
dt = DateTime.ISO.ParseDateTimeUTC(entry.published.text) | |
entry.my_date = dt.strftime('%m/%d/%Y') | |
entry.my_time = dt.strftime('%I:%M %p') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment