Method: Roo::Excelx::Cell::Time#initialize

Defined in:
lib/roo/excelx/cell/time.rb

#initialize(value, formula, excelx_type, style, link, base_date, coordinate) ⇒ Time

Returns a new instance of Time.



11
12
13
14
15
16
17
# File 'lib/roo/excelx/cell/time.rb', line 11

def initialize(value, formula, excelx_type, style, link, base_date, coordinate)
  # NOTE: Pass all arguments to DateTime super class.
  super
  @format = excelx_type.last
  @datetime = create_datetime(base_date, value)
  @value = link ? Roo::Link.new(link, value) : (value.to_f * 86_400).to_i
end