Return year integer value from datetime argument.
fn:year-from-dateTime(xs:dateTime? $arg) => xs:integer?
This function returns an integer value between 1 and 12, representing the year component of the localized value of the argument value. The localized value is the value in its original timezone or without timezone. The value may be negative. If the argument is an empty sequence, the empty sequence is returned.
$arg |
argument value of type |
---|
This function call returns the year component of the current date and time:
year-from-dateTime(current-dateTime())
This function call returns the year component of the specified date time value which is1999:
year-from-dateTime(xs:dateTime("1999-05-31T13:20:00-05:00"))
The following construct(s) refer to this construct: