date:week-in-year
Returns the week of the year as a number. If no argument is given, then the current local date/time, as returned by date:date-time is used as the default argument.
week-in-year($date-time as string?) ➔ number
Arguments | |||
| $date-time | string? | The input date/time |
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).
Details
For the purposes of numbering, counting follows ISO 8601: week 1 in a year is the week containing the first Thursday of the year, with new weeks beginning on a Monday.