lib/fast_excel.rb in fast_excel-0.2.2 vs lib/fast_excel.rb in fast_excel-0.2.3

- old
+ new

@@ -395,11 +395,11 @@ raise ArgumentError, "Can not write to saved row in constant_memory mode (attempted row: #{row_number}, last saved row: #{last_row_number})" end if value.is_a?(Numeric) write_number(row_number, cell_number, value, format) - elsif defined?(DateTime) && value.is_a?(DateTime) - write_datetime(row_number, cell_number, FastExcel.lxw_datetime(value), format) + elsif defined?(Date) && value.is_a?(Date) + write_datetime(row_number, cell_number, FastExcel.lxw_datetime(value.to_datetime), format) elsif value.is_a?(Time) write_datetime(row_number, cell_number, FastExcel.lxw_time(value), format) elsif value.is_a?(Formula) write_formula(row_number, cell_number, value.fml, format) else