Skip to content

Commit

Permalink
Tweak the displayed date on a tweet for previous years
Browse files Browse the repository at this point in the history
  • Loading branch information
caius committed Oct 24, 2011
1 parent 57727e4 commit 45ce6d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/view_tweets/app.rb
Expand Up @@ -31,7 +31,13 @@ def status_url screen_name, status_id

def display_date time
# todo: make this say x minutes/hours ago up to the next day, then display "day month"
time.strftime("%d %b")
str = if time.year < Time.now.year
"%d %b '%y"
else
"%d %b"
end

time.strftime str
end
end

Expand Down

0 comments on commit 45ce6d7

Please sign in to comment.