diff options
| author | Randy Morgan <[email protected]> | 2011-11-29 20:26:39 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-29 20:26:39 +0900 |
| commit | 8de2f93355f7693060f7b821c00fa1fbf2b2e508 (patch) | |
| tree | f5e4c72bd8fe490fef1fea4cf9e3f06862310526 /lib | |
| parent | c489b0b127b8746b7739c893717f84420c497605 (diff) | |
| download | caxlsx-8de2f93355f7693060f7b821c00fa1fbf2b2e508.tar.gz caxlsx-8de2f93355f7693060f7b821c00fa1fbf2b2e508.zip | |
always read the manual! Month is a string in the example on 1.8.7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index a81c9147..d61f5d51 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -169,8 +169,8 @@ module Axlsx def cast_value(v) if (@type == :time && v.is_a?(Time)) || (@type == :time && v.respond_to?(:to_time)) v = v.respond_to?(:to_time) ? v.to_time : v - epoc1900 = Time.local(1900, 1, 1) - epoc1904 = Time.local(1904,1, 1) + epoc1900 = Time.local(1900, "jan", 1) + epoc1904 = Time.local(1904,"jan", 1) epoc = Workbook.date1904 ? epoc1904 : epoc1900 ((v.localtime - epoc) /60.0/60.0/24.0).to_f elsif @type == :float |
