aboutsummaryrefslogtreecommitdiffstats
path: root/lib/roo/excelx/cell/time.rb
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-01-14 01:41:26 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-01-14 01:41:26 -0500
commit6aa7e04e06423e7d92ede727489ea346e88f7108 (patch)
tree9bdec92fd17898b662235bc0a491de827990130c /lib/roo/excelx/cell/time.rb
parentc59817e300dbe1aab3120cad603cdb14b14ed78b (diff)
parentdddfa903d2b856146f05ffb4415c31d6127bb5bf (diff)
Update upstream source from tag 'upstream/2.8.0'
Update to upstream version '2.8.0' with Debian dir 569f5866fbcf4e449c6c48dc5d20a3ab54f95252
Diffstat (limited to 'lib/roo/excelx/cell/time.rb')
-rw-r--r--lib/roo/excelx/cell/time.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/roo/excelx/cell/time.rb b/lib/roo/excelx/cell/time.rb
index d661ab8..a1f0864 100644
--- a/lib/roo/excelx/cell/time.rb
+++ b/lib/roo/excelx/cell/time.rb
@@ -4,15 +4,16 @@ module Roo
class Excelx
class Cell
class Time < Roo::Excelx::Cell::DateTime
- attr_reader :value, :formula, :format, :cell_value, :link, :coordinate
+ attr_reader :value, :formula, :format, :cell_value, :coordinate
+
+ attr_reader_with_default default_type: :time
def initialize(value, formula, excelx_type, style, link, base_date, coordinate)
# NOTE: Pass all arguments to DateTime super class.
super
- @type = :time
@format = excelx_type.last
@datetime = create_datetime(base_date, value)
- @value = link? ? Roo::Link.new(link, value) : (value.to_f * 86_400).to_i
+ @value = link ? Roo::Link.new(link, value) : (value.to_f * 86_400).to_i
end
def formatted_value