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