Revision: 2132
Updated Code
at January 1, 2007 11:10 by alexwilliams
Updated Code
def format_date(date, use_time = false)
if use_time == true
ampm = date.strftime("%p").downcase
new_date = date.strftime("%B %d, %Y at %I:%M" + ampm)
else
new_date = date.strftime("%B %d, %Y")
end
end
Revision: 2131
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 1, 2007 11:07 by alexwilliams
Initial Code
def format_date(date, use_time = false)
if use_time == true
ampm = date.strftime("%p").downcase
new_date = date.strftime("%B %d, %Y at %I:%M" + ampm)
else
new_date = date.strftime("%B %d, %Y")
end
end
Initial URL
Initial Description
Initial Title
Formatting a date with or without the time
Initial Tags
date, format, rails, ruby
Initial Language
Ruby