mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 14:05:11 +01:00
12 lines
322 B
Ruby
12 lines
322 B
Ruby
|
# 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
|