EXSLT - date:day-of-week-in-month - Version 1

Version: 1
Status: new
User Page: index.html
XML Definition: date.day-of-week-in-month.xml
Function Package: date.day-of-week-in-month.zip

Function Syntax

number date:day-of-week-in-month(string?, string?)

The date:day-of-week-in-month function returns the day-of-the-week in a month of a date as a number (e.g. 3 for the 3rd Tuesday in May). If no argument is given, then the current local date/time, as returned by date:date-time is used the default first argument.

The date/time string specified as the first 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.

The second argument is a the name of a date format (declared by date:date-format) that is used to work out the numerical day-of-the-week in the month. For details about how the format pattern is constructed and used, see date:date-format). The numbering of the days-of-the-week always begins at 1.

An implementation of this extension function in the EXSLT date namespace must conform to the behaviour described in this document.

Implementations

No XSLT processors that we know of have built-in support for date:day-of-week-in-month.

There are currently no third-party implementations of date:day-of-week-in-month.

Change History

Submitted: 2001-05-13
Creator: Jeni Tennison (http://www.jenitennison.com/)

Returns the day-of-the-week in the month given in a date/time string as a number.

http://www.exslt.org/date/functions/day-of-week-in-month/date.day-of-week-in-month.1.html last modified 2001-05-13