Class: RDF::Literal::YearMonthDuration

Inherits:
RDF::Literal show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-e532a0ab7189/lib/rdf/xsd/duration.rb

Overview

A YearMonthDuration literal.

yearMonthDuration is a datatype ·derived· from duration by restricting its ·lexical representations· to instances of yearMonthDurationLexicalRep. The ·value space· of yearMonthDuration is therefore that of duration restricted to those whose ·seconds· property is 0. This results in a duration datatype which is totally ordered.

Constant Summary collapse

DATATYPE =
RDF::XSD.yearMonthDuration
GRAMMAR =
%r(\A
  (?<si>-)?
  P(?:(?:(?:(?:(?<yr>\d+)Y)(?:(?<mo>\d+)M)?)
      |  (?:(?:(?<mo>\d+)M))
      )
   )
\z)x.freeze

Method Summary

Methods inherited from RDF::Literal

#inspect, #valid_extended?