example_plugin.rb in doing-2.1.14 vs example_plugin.rb in doing-2.1.15
- old
+ new
@@ -150,14 +150,12 @@
if interval
took = '. You finished on '
finished_at = i.end_date
took += finished_at.strftime('%A %B %e at %I:%M%p')
- d, h, m = wwid.format_time(interval)
+
took += ' and it took'
- took += " #{d.to_i} days" if d.to_i.positive?
- took += " #{h.to_i} hours" if h.to_i.positive?
- took += " #{m.to_i} minutes" if m.to_i.positive?
+ took += interval.time_string(format: :natural)
end
end
date = i.date.strftime('%A %B %e at %I:%M%p')
title = i.title.gsub(/@/, 'hashtag ')