date:day-in-week

Returns the day of the week given in a date 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. The numbering of days of the week starts at 1 for Sunday, 2 for Monday and so on up to 7 for Saturday.

day-in-week($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

EXSLT Dates and Times Module

Saxon availability

Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only (not .NET).