Sha256: a9ec0b00ac33287fd0d6975dbabe3c90ac094a39151be05b2f77a376c66aa0ad
Contents?: true
Size: 645 Bytes
Versions: 9
Compression:
Stored size: 645 Bytes
Contents
module MissionControl::Jobs::DatesHelper def time_ago_in_words_with_title(time) tag.span time_ago_in_words(time), title: time.to_fs(:long) end def time_distance_in_words_with_title(time) tag.span distance_of_time_in_words_to_now(time, include_seconds: true), title: "Since #{time.to_fs(:long)}" end def bidirectional_time_distance_in_words_with_title(time) time_distance = if time.past? "#{distance_of_time_in_words_to_now(time, include_seconds: true)} ago" else "in #{distance_of_time_in_words_to_now(time, include_seconds: true)}" end tag.span time_distance, title: time.to_fs(:long) end end
Version data entries
9 entries across 9 versions & 1 rubygems