Lexer

This service class allows to convert duration representations into corresponding values.

package
struct Lexer {}

Members

Static functions

toDuration
Duration toDuration(string representation)

Converts the specified representation into its duration value. While the duration data type of the XML Schema language allows to also specify year and month fields, such representations cannot be converted to durations. Consequently, only the derived data type 'dayTimeDuration' of the XML Schema language is supported here, where all representations with year or month fields are excluded. For decimal fractions, digits representing less than one millisecond are disregarded.

Meta

Standards

ISO 8601 "Data elements and interchange formats — Information interchange — Representation of dates and times"