File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -618,25 +618,6 @@ def setup
618618 @modsort = get_sorted_module_list @classes
619619 end
620620
621- ##
622- # Return a string describing the amount of time in the given number of
623- # seconds in terms a human can understand easily.
624-
625- def time_delta_string seconds
626- return 'less than a minute' if seconds < 60
627- return "#{ seconds / 60 } minute#{ seconds / 60 == 1 ? '' : 's' } " if
628- seconds < 3000 # 50 minutes
629- return 'about one hour' if seconds < 5400 # 90 minutes
630- return "#{ seconds / 3600 } hours" if seconds < 64800 # 18 hours
631- return 'one day' if seconds < 86400 # 1 day
632- return 'about one day' if seconds < 172800 # 2 days
633- return "#{ seconds / 86400 } days" if seconds < 604800 # 1 week
634- return 'about one week' if seconds < 1209600 # 2 week
635- return "#{ seconds / 604800 } weeks" if seconds < 7257600 # 3 months
636- return "#{ seconds / 2419200 } months" if seconds < 31536000 # 1 year
637- return "#{ seconds / 31536000 } years"
638- end
639-
640621 ##
641622 # Creates a template from its components and the +body_file+.
642623 #
You can’t perform that action at this time.
0 commit comments