Name
seconds( ) — normalizes a dayTimeDuration
into a number of seconds
Synopsis
Defined in: XForms 1.0 |
Parameters: string dayTimeDuration (required) |
Return type: number |
This function computes a fractional number of seconds that is
equivalent in length to the dayTimeDuration
parameter (formatted according to XML Schema rules).
Tip
This function makes the distinction of working on a
dayTimeDuration
, which is a more fine-grained
datatype than defined by XML Schema. Chapter 4
discusses this in greater detail.
This example returns 297001.5:
seconds("P3DT10H30M1.5S")
Get XForms Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.