Class: ExcelAbstraction::Date

Inherits:
Float
  • Object
show all
Defined in:
lib/excel_templating/excel_abstraction/date.rb

Constant Summary collapse

ADJUSTMENT =
::Date.parse("1900-03-01")
REFERENCE =
::Date.parse("1900-01-01")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_value) ⇒ Date

Returns a new instance of Date.



10
11
12
# File 'lib/excel_templating/excel_abstraction/date.rb', line 10

def initialize(raw_value)
  super(convert(raw_value))
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8
9
10
# File 'lib/excel_templating/excel_abstraction/date.rb', line 8

def value
  @value
end

Instance Method Details

#to_excel_dateObject



14
15
16
# File 'lib/excel_templating/excel_abstraction/date.rb', line 14

def to_excel_date
  self
end