Description
The functx:day-of-week-name-en function calculates the day of the week of $date. It returns the English name of the day, e.g. "Sunday", "Monday", etc.
The $date argument must be castable to xs:date, meaning that it must have the type xs:date or xs:dateTime, or be an xs:string or untyped value of the form YYYY-MM-DD.
Arguments and Return Type| Name | Type | Description |
$date |
xs:anyAtomicType? |
the date |
| return value |
xs:string? |
XQuery Function Declaration| See XSLT definition. | | XQuery Syntax for January 2007 (1.0): |
|---|
declare namespace functx = "http://www.functx.com";
declare function functx:day-of-week-name-en
( $date as xs:anyAtomicType? ) as xs:string? {
('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday')
[functx:day-of-week($date) + 1]
} ; | | XQuery Syntax for July 2004 - November 2005 (CR): |
|---|
declare namespace functx = "http://www.functx.com";
declare function functx:day-of-week-name-en
( $date as xdt:anyAtomicType? ) as xs:string? {
('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday')
[functx:day-of-week($date) + 1]
} ; | | XQuery Syntax for May 2003: |
|---|
declare namespace functx = "http://www.functx.com"
define function day-of-week-name-en
( $date as xdt:anyAtomicType? ) as xs:string? {
('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday')
[functx:day-of-week($date) + 1]
} |
Examples| XQuery Example | Results |
|---|
functx:day-of-week-name-en(
xs:date('2004-11-04'))
|
Thursday
|
functx:day-of-week-name-en('2004-11-04')
|
Thursday
|
Depends OnSee AlsoHistory |
|