class RDF::Literal::Day

gDay is a gregorian day that recurs, specifically a day of the month such as the 5th of the month. Arbitrary recurring days are not supported by this datatype. The value space of gDay is the space of a set of calendar dates as defined in ยง 3 of [ISO 8601]. Specifically, it is a set of one-day long, monthly periodic instances.

@see www.w3.org/TR/2004/REC-xmlschema-2-20041028/#gDay

Constants

DATATYPE
FORMAT
GRAMMAR

Public Class Methods

new(value, datatype: nil, lexical: nil, **options) click to toggle source
Calls superclass method
# File lib/rdf/xsd/date.rb, line 83
def initialize(value, datatype: nil, lexical: nil, **options)
  @string = lexical || value.to_s
  object = GRAMMAR.match(value.to_s) && ::Date.parse("0000-01-#{$1}#{$2}")
  super(object, lexical: @string)
end