Class: EDTF::Century
Instance Attribute Summary
Attributes inherited from Epoch
#year
Instance Method Summary
collapse
Methods inherited from Epoch
#<=>, #initialize, #to_date
Constructor Details
This class inherits a constructor from EDTF::Epoch
Instance Method Details
#to_edtf ⇒ Object
38
39
40
|
# File 'lib/edtf/epoch.rb', line 38
def to_edtf
'%02dxx' % (year / 100)
end
|
#to_range ⇒ Object
33
34
35
36
|
# File 'lib/edtf/epoch.rb', line 33
def to_range
d = to_date
d .. d.years_since(100).end_of_year
end
|