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_datetime.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_datetime.rb')
| -rw-r--r-- | test/excelx/cell/test_datetime.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/excelx/cell/test_datetime.rb b/test/excelx/cell/test_datetime.rb index 425830b..4ab1e18 100644 --- a/test/excelx/cell/test_datetime.rb +++ b/test/excelx/cell/test_datetime.rb @@ -2,12 +2,12 @@ require 'test_helper' class TestRooExcelxCellDateTime < Minitest::Test def test_cell_value_is_datetime - cell = datetime.new('30000.323212', nil, ['mm-dd-yy'], nil, nil, base_date, nil) + cell = datetime.new('30000.323212', nil, ['mm-dd-yy'], nil, nil, base_timestamp, nil) assert_kind_of ::DateTime, cell.value end def test_cell_type_is_datetime - cell = datetime.new('30000.323212', nil, [], nil, nil, base_date, nil) + cell = datetime.new('30000.323212', nil, [], nil, nil, base_timestamp, nil) assert_equal :datetime, cell.type end @@ -19,7 +19,7 @@ class TestRooExcelxCellDateTime < Minitest::Test ['mmm-yy', 'JAN-15'], ['m/d/yy h:mm', '1/25/15 8:15'] ].each do |format, formatted_value| - cell = datetime.new '42029.34375', nil, [format], nil, nil, base_date, nil + cell = datetime.new '42029.34375', nil, [format], nil, nil, base_timestamp, nil assert_equal formatted_value, cell.formatted_value end end @@ -30,7 +30,7 @@ class TestRooExcelxCellDateTime < Minitest::Test ['h:mm:ss000 mm/yy', '8:15:00000 01/15'], ['mmm yyy', '2015-01-25 08:15:00'] ].each do |format, formatted_value| - cell = datetime.new '42029.34375', nil, [format], nil, nil, base_date, nil + cell = datetime.new '42029.34375', nil, [format], nil, nil, base_timestamp, nil assert_equal formatted_value, cell.formatted_value end end @@ -39,7 +39,7 @@ class TestRooExcelxCellDateTime < Minitest::Test Roo::Excelx::Cell::DateTime end - def base_date - Date.new(1899, 12, 30) + def base_timestamp + DateTime.new(1899, 12, 30).to_time.to_i end end |
