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, cleanup, #encoding, #encoding?, #end?, from_element, #inferred?, #initialize, #point, #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



44
45
46
# File 'lib/mods/date.rb', line 44

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