functx:time

Construct a time from an hour, minute and second

Description

The functx:time function constructs an xs:time value from arguments representing the hour, minute and second. The arguments can have any type that can be cast to xs:integer. If the combination does not result in a valid time (e.g. the hour is 25 or the minute is 61), an error is raised. The function does not currently support decimal numbers for $second.

Parameters

Description

hour:time()

the hour

minute:time()

the minute

second:time()

the second

Examples

XPath

Results

functx:time(20,6,12)

20:06:12

functx:time('20','6','12')

20:06:12

In a generator

Copy the snippet below and paste it in Freemapper, under a language node inside the generators element. Each line of the pattern prints the result of one example; to see them, run mi generate <project> <language> example-functx-time.

[e] example-functx-time
    [e] start
        [e] match
            [v] /
        [e] body
            [e] write-pattern
                [v] examples
    [e] patterns
        [e] examples
            [v] E01: {{ functx:time(20,6,12) }}
            [v] E02: {{ functx:time('20','6','12') }}

Depends On

See Also