EXSLT - date:week-in-year

Implementer Page: date.week-in-year.html
Function Package: date.week-in-year.zip

Function Syntax

number date:week-in-year(string?)

Template Syntax

<xsl:call-template name="date:week-in-year">
   <xsl:with-param name="date-time" select="string" />?
</xsl:call-template>

The date:week-in-year function 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. 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.

The date/time string specified as the argument is a right-truncated string in the format defined as the lexical representation of xs:dateTime in one of the formats defined in [XML Schema Part 2: Datatypes]. The permitted formats are as follows:

If the date/time string is not in one of these formats, then NaN is returned.

Implementations

The following XSLT processors support date:week-in-year:

Implementations of date:week-in-year are available in the following languages:

The following third-party implementations of earlier versions of date:week-in-year are available:

http://www.exslt.org/date/functions/week-in-year/index.html last modified 2002-11-12