Class: Mods::Date::MarcFormat
- Inherits:
-
EdtfFormat
- Object
- Mods::Date
- EdtfFormat
- Mods::Date::MarcFormat
- Defined in:
- lib/mods/date.rb
Overview
MARC-formatted date parser, similar to EDTF, but with special support for MARC-specific encodings
Instance Attribute Summary
Attributes inherited from EdtfFormat
Attributes inherited from Mods::Date
Class Method Summary collapse
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
65 66 67 68 69 |
# File 'lib/mods/date.rb', line 65 def self.cleanup(text) return nil if text == "9999" || text == "uuuu" text.gsub(/^[\[]+/, '').gsub(/[\.\]]+$/, '') end |