Class: Time

Inherits:
Object
  • Object
show all
Includes:
TimeFunctions
Defined in:
lib/sequel/fos_dates.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from TimeFunctions

#as_minutes, #hm, #in_hundredths, #in_hundredths_rounded_xos, #in_tenths_rounded_xos

Class Method Details

.from_fos_time(minutes) ⇒ Object Also known as: from_minutes

using a date of 2000,1,1 is arbitrary



62
63
64
65
# File 'lib/sequel/fos_dates.rb', line 62

def self.from_fos_time(minutes)
  minutes = 0 unless minutes
  Time.utc(2000, 1, 1) + minutes.minutes
end

Instance Method Details

#original_to_sObject



54
# File 'lib/sequel/fos_dates.rb', line 54

alias :original_to_s :to_s

#to_s(args = nil) ⇒ Object



56
57
58
59
# File 'lib/sequel/fos_dates.rb', line 56

def to_s(args=nil)
  args = :hm unless args
  self.original_to_s(args)
end