Module: Weblog::Helpers
Instance Method Summary collapse
Instance Method Details
#format_date(date) ⇒ Object
3 4 5 6 |
# File 'lib/weblog/helpers.rb', line 3 def format_date(date) return '' if date.nil? date.strftime("%d-%m-%Y") end |
#format_date_and_time(time) ⇒ Object
8 9 10 11 |
# File 'lib/weblog/helpers.rb', line 8 def format_date_and_time(time) return '' if time.nil? time.strftime("#{format_date(time)}, %H:%M") end |