Moved pretty date formatting from revision to the main view helper, where this presentation logic obviously belongs
This commit is contained in:
parent
5b075ca338
commit
06959ab278
6 changed files with 10 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue