Method: RubyXL::Workbook#date_to_num
- Defined in:
- lib/rubyXL/objects/workbook.rb
permalink #date_to_num(date) ⇒ Object
[View source]
423 424 425 426 427 428 |
# File 'lib/rubyXL/objects/workbook.rb', line 423 def date_to_num(date) case date when Date, DateTime then (date.ajd - base_date.ajd).to_f when Time then ((date.to_r - base_date.to_time.to_r) / 86400).to_f end end |