Class: CocinaDisplay::Dates::UndeclaredEdtfFormat

Inherits:
ExtractorDateFormat show all
Defined in:
lib/cocina_display/dates/date.rb

Overview

Extractor for dates that already match EDTF, they just didn’t declare it Matches YYYY-MM-DD, YYYY-MM and YYYY; no further normalization needed

Constant Summary collapse

REGEX =
/^(?<year>\d{4})(?:-(?<month>\d{2}))?(?:-(?<day>\d{2}))?$/

Constants inherited from Date

Date::BCE_CHAR_SORT_MAP, Date::UNPARSABLE_VALUES

Instance Attribute Summary

Attributes inherited from Date

#cocina, #date, #encoding, #type

Method Summary

Methods inherited from ExtractorDateFormat

supports?

Methods inherited from Date

#<=>, #approximate?, #as_range, #base_value, #decoded_value, #encoding?, #end?, format_date, from_cocina, #inferred?, #initialize, #label, normalize_to_edtf, notifier, #parsable?, parse_date, #parsed_date?, #precision, #primary?, #qualified?, #qualified_value, #qualifier, #questionable?, #sort_key, #start?, #to_a, #to_s, #value

Constructor Details

This class inherits a constructor from CocinaDisplay::Dates::Date