Class: Mods::Date::MysteryCenturyFormat
- Inherits:
-
ExtractorDateFormat
- Object
- Mods::Date
- ExtractorDateFormat
- Mods::Date::MysteryCenturyFormat
- Defined in:
- lib/mods/date.rb
Overview
Full-text extractor for a flavor of century encoding present in Stanford data of unknown origin.
Constant Summary collapse
- REGEX =
/(?<century>\d{2})--/
Instance Attribute Summary
Attributes inherited from Mods::Date
Class Method Summary collapse
Methods inherited from ExtractorDateFormat
Methods inherited from Mods::Date
#approximate?, #as_range, #encoding, #encoding?, #end?, from_element, #inferred?, #initialize, parse_date, #point, #qualifier, #questionable?, #single?, #start?, #text, #to_a, #type
Constructor Details
This class inherits a constructor from Mods::Date
Class Method Details
.cleanup(text) ⇒ Object
168 169 170 171 |
# File 'lib/mods/date.rb', line 168 def self.cleanup(text) matches = text.match(REGEX) "#{matches[:century]}XX" end |