Description
The functx:day-of-week-abbrev-en function calculates the day of the week of $date . It returns the English abbreviation of the day, e.g. "Sun", "Mon", 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 TypeName | Type | Description |
$date |
xs:anyAtomicType? |
the date |
return value |
xs:string? |
XQuery Function DeclarationSee XSLT definition. | declare namespace functx = "http://www.functx.com";
declare function functx:day-of-week-abbrev-en
( $date as xs:anyAtomicType? ) as xs:string? {
('Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat')
[functx:day-of-week($date) + 1]
} ; |
ExamplesXQuery Example | Results |
---|
functx:day-of-week-abbrev-en(
xs:date('2004-11-04')) |
Thurs |
functx:day-of-week-abbrev-en('2004-11-04') |
Thurs |
Depends OnSee AlsoHistory |
Recommended Reading:
|