Class: Fixnum
Constant Summary
Constants included from MirUtility
MirUtility::MONTHS, MirUtility::STATE_CODES
Instance Method Summary collapse
-
#to_hrs_mins_secs ⇒ Object
Given a number of seconds, convert into a string like HH:MM:SS.
Methods included from MirUtility
canonical_url, destroy_old_sessions, normalize, normalize_slug, state_name_for
Instance Method Details
#to_hrs_mins_secs ⇒ Object
Given a number of seconds, convert into a string like HH:MM:SS
645 646 647 648 649 |
# File 'lib/mir_utility.rb', line 645 def to_hrs_mins_secs _now = DateTime.now _d = Date::day_fraction_to_time((_now + self.seconds) - _now) "#{sprintf('%02d',_d[0])}:#{sprintf('%02d',_d[1])}:#{sprintf('%02d',_d[2])}" end |