EXSLT - date:duration

Implementer Page: date.duration.html
Function Package: date.duration.zip

Function Syntax

string date:duration(number?)

Template Syntax

<xsl:call-template name="date:duration">
   <xsl:with-param name="seconds" select="number" />?

The date:duration function returns a duration string representing the number of seconds specified by the argument string. If no argument is given, then the result of calling date:seconds without any arguments is used as a default argument.

The duration is returned as a string in the format defined for xs:duration in [3.2.6 duration] of [XML Schema Part 2: Datatypes].

The number of years and months in the duration string must be equal to zero. (The format of the string will be PnDTnHnMnS.) The number of seconds specified in the duration string must be less than 60; the number of minutes must be less than 60; the number of hours must be less than 24.

If the argument is Infinity, -Infinity or NaN, then date:duration returns an empty string ('').


The following XSLT processors support date:duration:

Implementations of date:duration are available in the following languages:

http://www.exslt.org/date/functions/duration/index.html last modified 2002-08-21