Module: Trestle::TimestampHelper
- Defined in:
- app/helpers/trestle/timestamp_helper.rb
Instance Method Summary collapse
Instance Method Details
#datestamp(date) ⇒ Object
12 13 14 15 16 |
# File 'app/helpers/trestle/timestamp_helper.rb', line 12 def datestamp(date) time_tag(date, class: "datestamp") do l(date, format: :trestle_calendar, default: "%-m/%-d/%Y") end end |
#timestamp(time) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/trestle/timestamp_helper.rb', line 3 def (time) time_tag(time, class: "timestamp") do safe_join([ l(time, format: :trestle_date, default: proc { |date| "#{date.day.ordinalize} %b %Y" }), content_tag(:small, l(time, format: :trestle_time_with_seconds, default: "%l:%M:%S %p")) ], "\n") end end |