date:seconds
Returns the number of seconds specified by the argument string (a date/time or duration).
If the argument is a date/time then the function returns the time difference in seconds
between the date/time and 1970-01-01T00:00:00Z
. If no argument is given, then
the current local date/time is used as the default argument, and so the function returns
the number of seconds since 1 Jan 1970. A duration argument (in days, hours, minutes, and
seconds) is converted into seconds.
seconds($input as string?) ➔ number
Arguments | |||
| $input | string? | The input string (a date/time or duration) |
Result | number |
Namespace
http://exslt.org/dates-and-times
Links to specifications
Saxon availability
Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only (not .NET).
Notes on the Saxon implementation
The specifications of the EXSLT date-and-time handling functions have little to say about timezones. Saxon generally handles inputs with or without a timezone, and uses the XPath 2.0 concept of implicit timezone to interpret the meaning of dates/times without a timezone. The current date and time used by EXSLT functions is the same as that used by the XPath 2.0 current-dateTime() function.