Fixed rendering of Recently Revised
This commit is contained in:
parent
f8b3e2b11d
commit
e44d16aef9
4 changed files with 26 additions and 17 deletions
|
@ -79,12 +79,10 @@ module ApplicationHelper
|
|||
|
||||
def format_date(date, include_time = true)
|
||||
# Must use DateTime because Time doesn't support %e on at least some platforms
|
||||
date_time = DateTime.new(date.year, date.mon, date.day, date.hour, date.min,
|
||||
date.sec)
|
||||
if include_time
|
||||
return date_time.strftime("%B %e, %Y %H:%M:%S")
|
||||
DateTime.new(date.year, date.mon, date.day, date.hour, date.min, date.sec).strftime("%B %e, %Y %H:%M:%S")
|
||||
else
|
||||
return date_time.strftime("%B %e, %Y")
|
||||
DateTime.new(date.year, date.mon, date.day).strftime("%B %e, %Y")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue