# EXSLT - date:week-in-month

Implementer Page: date.week-in-month.html Function Package: date.week-in-month.zip #### Function Syntax
    number date:week-in-month(string?)
#### Template Syntax
    <xsl:call-template name="date:week-in-month">
       <xsl:with-param name="date-time" select="string" />?
    </xsl:call-template>
The `date:week-in-month` function returns the week in a month of a date as a number. If no argument is given, then the current local date/time, as returned by `date:date-time` is used the default argument. For the purposes of numbering, the first day of the month is in week 1 and new weeks begin on a Monday (so the first and last weeks in a month will often have less than 7 days in them). 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: `xs:dateTime` (`CCYY-MM-DDThh:mm:ss`) `xs:date` (`CCYY-MM-DD`) 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-month`: libxslt from Daniel Veillard et al. (version 1.0.19) The following processors support earlier versions of `date:week-in-month`: SAXON from Michael Kay (version 6.4.2) There are currently no third-party implementations of the latest version of `date:week-in-month`. The following third-party implementations of earlier versions of `date:week-in-month` are available: EXSLT Function (by Jeni Tennison) XSLT Template (by Jeni Tennison) Javascript (by Chris Bayes) Msxsl (by Chris Bayes)

http://www.exslt.org/date/functions/week-in-month/index.html last modified 2002-08-21