fn:seconds-from-time

Return seconds integer value from time argument.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

fn:seconds-from-time(xs:time? $arg) => xs:integer?

Description

This function returns an integer value between 0 and 60.999, representing the seconds component of the localized value of the argument value. The localized value is the value in its original timezone or without timezone. If the argument is an empty sequence, the empty sequence is returned.

Please note that the value can be beyond 60 in order to account for leap seconds.

Argument

$arg

argument value of type xs:time

Examples

  • This function call returns the seconds component of the current time:

    seconds-from-time(current-time())
  • This function call returns the seconds component of the specified time value which is 0:

    seconds-from-time(xs:time("01:23:00+05:00"))