Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/cotcube-helpers/swig/date.rb

Instance Method Summary collapse

Instance Method Details

#to_centiObject



2
3
4
# File 'lib/cotcube-helpers/swig/date.rb', line 2

def to_centi
  (self.to_f * 1000.0).to_i
end

#to_part(x = 100) ⇒ Object



6
7
8
# File 'lib/cotcube-helpers/swig/date.rb', line 6

def to_part(x=100)
  (self.to_f * x.to_f).to_i % x
end