The days-to-date() Function
Release 2.0 - ...
Syntax
Copy Code | |
---|---|
string days-to-date(number) |
Description
This function returns a string containing a lexical xsd:date that corresponds to the number of days passed as the parameter according to the following rules:
- The number parameter is rounded to the nearest whole number, and the result is interpreted as the difference between the desired date and 1970-01-01.
An input parameter value of NaN results in output of the empty string.
Example
XML | Copy Code |
---|---|
<xforms:output value="days-to-date(11688)"> <xforms:label>Days-to-date : </xforms:label> </xforms:output> |
The above example returns "2002-01-01".
Specification
Link to the XForms specification: the days-to-date() function.