Class: Mods::Date::Iso8601Format

Inherits:
Mods::Date show all
Defined in:
lib/mods/date.rb

Overview

Strict ISO8601-encoded date parser

Instance Attribute Summary

Attributes inherited from Mods::Date

#date, #xml

Class Method Summary collapse

Methods inherited from Mods::Date

#approximate?, #as_range, #encoding, #encoding?, #end?, from_element, #inferred?, #initialize, #key?, normalize_to_edtf, #point, #precision, #qualifier, #questionable?, #single?, #start?, #text, #to_a, #type

Constructor Details

This class inherits a constructor from Mods::Date

Class Method Details

.parse_date(text) ⇒ Object



51
52
53
# File 'lib/mods/date.rb', line 51

def self.parse_date(text)
  @date = ::Date.parse(normalize_to_edtf(text))
end