announcements_helper.rb 322 B

1234567891011
  1. # frozen_string_literal: true
  2. module Admin::AnnouncementsHelper
  3. def time_range(announcement)
  4. if announcement.all_day?
  5. safe_join([l(announcement.starts_at.to_date), ' - ', l(announcement.ends_at.to_date)])
  6. else
  7. safe_join([l(announcement.starts_at), ' - ', l(announcement.ends_at)])
  8. end
  9. end
  10. end