Extracts the year from $date-var.
If the value of $date-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.
xf:get-year-from-date(xs:date? $date-var) —> xs:integer?
Returns the year as an integer from $date-var.
When you invoke the following query:
<year>{xf:get-year-from-date("2002-08-30")}</year>
The preceding query generates the following result:
<year>2002</year>
W3C get-year-from-date function description.
W3C date data type description.