Class: RDF::Literal::DayTimeDuration

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 DayTimeDuration literal.

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

Constant Summary collapse

DATATYPE =
RDF::XSD.dayTimeDuration
GRAMMAR =
%r(\A
  (?<si>-)?
  P(?:(?:(?:(?<da>\d+)D)
      )
      (?:T(?:(?:(?:(?<hr>\d+)H)(?:(?<mi>\d+)M)?(?<se>\d+(?:\.\d+)?S)?)
          |  (?:(?:(?<mi>\d+)M)(?:(?<se>\d+(?:\.\d+)?)S)?)
          |  (?:(?<se>\d+(?:\.\d+)?)S)
          )
      )?
   |(?:T(?:(?:(?:(?<hr>\d+)H)(?:(?<mi>\d+)M)?(?<se>\d+(?:\.\d+)?S)?)
        |  (?:(?:(?<mi>\d+)M)(?:(?<se>\d+(?:\.\d+)?)S)?)
        |   (?:(?<se>\d+(?:\.\d+)?)S)
        )
    )
   )
\z)x.freeze

Method Summary

Methods inherited from RDF::Literal

#inspect, #valid_extended?