/ Published in: Ruby
Expand |
Embed | Plain Text
def gmail_date_format(date) Time.now.beginning_of_day <= date ? date.strftime('%I').to_i.to_s + date.strftime(':%M ') + date.strftime('%p').downcase : Time.now.beginning_of_year <= date ? date.strftime('%b ') + date.day.to_s : date.strftime('%x') end
You need to login to post a comment.
