Moved pretty date formatting from revision to the main view helper, where this presentation logic obviously belongs

This commit is contained in:
Alexey Verkhovsky 2005-08-14 23:35:10 +00:00
parent 5b075ca338
commit 06959ab278
6 changed files with 10 additions and 12 deletions

View file

@ -72,4 +72,10 @@ module ApplicationHelper
h(text).gsub(/\n/, '<br/>')
end
def format_date(date)
# Must use DateTime because Time doesn't support %e on at least some platforms
DateTime.new(date.year, date.mon, date.day, date.hour, date.min,
date.sec).strftime("%B %e, %Y %H:%M:%S")
end
end