diff options
| author | 2019-01-14 01:41:26 -0500 | |
|---|---|---|
| committer | 2019-01-14 01:41:26 -0500 | |
| commit | 6aa7e04e06423e7d92ede727489ea346e88f7108 (patch) | |
| tree | 9bdec92fd17898b662235bc0a491de827990130c /test/excelx/cell/test_time.rb | |
| parent | c59817e300dbe1aab3120cad603cdb14b14ed78b (diff) | |
| parent | dddfa903d2b856146f05ffb4415c31d6127bb5bf (diff) | |
Update upstream source from tag 'upstream/2.8.0'
Update to upstream version '2.8.0'
with Debian dir 569f5866fbcf4e449c6c48dc5d20a3ab54f95252
Diffstat (limited to 'test/excelx/cell/test_time.rb')
| -rw-r--r-- | test/excelx/cell/test_time.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/excelx/cell/test_time.rb b/test/excelx/cell/test_time.rb index 7619b3a..25d15f9 100644 --- a/test/excelx/cell/test_time.rb +++ b/test/excelx/cell/test_time.rb @@ -5,8 +5,8 @@ class TestRooExcelxCellTime < Minitest::Test Roo::Excelx::Cell::Time end - def base_date - Date.new(1899, 12, 30) + def base_timestamp + DateTime.new(1899, 12, 30).to_time.to_i end def test_formatted_value @@ -18,13 +18,13 @@ class TestRooExcelxCellTime < Minitest::Test ['[h]:mm:ss', '[1]:48:09'], ['mmss.0', '4809.0'] # Cell::Time always get rounded to the nearest second. ].each do |style_format, result| - cell = roo_time.new(value, nil, [:numeric_or_formula, style_format], 6, nil, base_date, nil) + cell = roo_time.new(value, nil, [:numeric_or_formula, style_format], 6, nil, base_timestamp, nil) assert_equal result, cell.formatted_value, "Style=#{style_format} is not properly formatted" end end def test_value - cell = roo_time.new('0.0751', nil, [:numeric_or_formula, 'h:mm'], 6, nil, base_date, nil) + cell = roo_time.new('0.0751', nil, [:numeric_or_formula, 'h:mm'], 6, nil, base_timestamp, nil) assert_kind_of Integer, cell.value end end |
