Files
fizzy/app/helpers/time_helper.rb
T
Kevin McConnell 6f8c929898 Use cache-friendly "time ago"
Also introduces a local time helper that we can use to format dates and
times.
2025-01-16 17:47:25 +00:00

6 lines
181 B
Ruby

module TimeHelper
def local_datetime_tag(datetime, style: :time, **attributes)
tag.time **attributes, datetime: datetime.iso8601, data: { local_time_target: style }
end
end