Module: DatetimeHelper
- Defined in:
- app/helpers/datetime_helper.rb
Instance Method Summary collapse
- #abbr_date_for(tach) ⇒ Object
- #abbr_date_time_for(tach) ⇒ Object
- #abbr_day_name_for(tach) ⇒ Object
- #abbr_month_and_day_for(tach) ⇒ Object
- #abbr_month_name_for(tach) ⇒ Object
- #date_for(tach) ⇒ Object
- #date_time_for(tach) ⇒ Object
- #day_name_for(tach) ⇒ Object
- #day_number_for(tach) ⇒ Object
- #month_day_and_time_for(tach) ⇒ Object
- #month_name_for(tach) ⇒ Object
- #timezone_name_for(tach) ⇒ Object
- #twelve_hour_time_for(tach) ⇒ Object
- #twenty_four_hour_time_for(tach) ⇒ Object
Instance Method Details
#abbr_date_for(tach) ⇒ Object
69 70 71 72 73 |
# File 'app/helpers/datetime_helper.rb', line 69 def abbr_date_for(tach) unless tach.blank? tach.strftime("%b %d, %Y") end end |
#abbr_date_time_for(tach) ⇒ Object
75 76 77 78 79 |
# File 'app/helpers/datetime_helper.rb', line 75 def abbr_date_time_for(tach) unless tach.blank? tach.strftime("%b %d, %Y at %I:%M %p") end end |
#abbr_day_name_for(tach) ⇒ Object
57 58 59 60 61 |
# File 'app/helpers/datetime_helper.rb', line 57 def abbr_day_name_for(tach) unless tach.blank? tach.strftime("%a") end end |
#abbr_month_and_day_for(tach) ⇒ Object
63 64 65 66 67 |
# File 'app/helpers/datetime_helper.rb', line 63 def abbr_month_and_day_for(tach) unless tach.blank? tach.strftime("%b %d") end end |
#abbr_month_name_for(tach) ⇒ Object
39 40 41 42 43 |
# File 'app/helpers/datetime_helper.rb', line 39 def abbr_month_name_for(tach) unless tach.blank? tach.strftime("%b") end end |
#date_for(tach) ⇒ Object
15 16 17 18 19 |
# File 'app/helpers/datetime_helper.rb', line 15 def date_for(tach) unless tach.blank? tach.strftime("%B %e, %Y") end end |
#date_time_for(tach) ⇒ Object
9 10 11 12 13 |
# File 'app/helpers/datetime_helper.rb', line 9 def date_time_for(tach) unless tach.blank? tach.strftime("%B %e, %Y at %I:%M %p") end end |
#day_name_for(tach) ⇒ Object
45 46 47 48 49 |
# File 'app/helpers/datetime_helper.rb', line 45 def day_name_for(tach) unless tach.blank? tach.strftime("%A") end end |
#day_number_for(tach) ⇒ Object
51 52 53 54 55 |
# File 'app/helpers/datetime_helper.rb', line 51 def day_number_for(tach) unless tach.blank? tach.strftime("%e") end end |
#month_day_and_time_for(tach) ⇒ Object
3 4 5 6 7 |
# File 'app/helpers/datetime_helper.rb', line 3 def month_day_and_time_for(tach) unless tach.blank? tach.strftime("%B %e at %I:%M %p") end end |
#month_name_for(tach) ⇒ Object
33 34 35 36 37 |
# File 'app/helpers/datetime_helper.rb', line 33 def month_name_for(tach) unless tach.blank? tach.strftime("%B") end end |
#timezone_name_for(tach) ⇒ Object
81 82 83 84 85 |
# File 'app/helpers/datetime_helper.rb', line 81 def timezone_name_for(tach) unless tach.blank? tach.strftime("%Z") end end |
#twelve_hour_time_for(tach) ⇒ Object
27 28 29 30 31 |
# File 'app/helpers/datetime_helper.rb', line 27 def twelve_hour_time_for(tach) unless tach.blank? tach.strftime("%I:%M %p") end end |
#twenty_four_hour_time_for(tach) ⇒ Object
21 22 23 24 25 |
# File 'app/helpers/datetime_helper.rb', line 21 def twenty_four_hour_time_for(tach) unless tach.blank? tach.strftime("%H:%M") end end |