home contribute faq download

FunctX XSLT Functions

functx:day-of-week-abbrev-en

The abbreviated day of the week, from a date, in English

Google
Webxsltfunctions.com

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 Type

NameTypeDescription
$date xs:anyAtomicType? the date
return value xs:string?

XSLT Function Declaration

See XQuery definition.
XSLT 2.0 Syntax:
<xsl:function name="functx:day-of-week-abbrev-en" as="xs:string?"
              xmlns:functx="http://www.functx.com" >
  <xsl:param name="date" as="xs:anyAtomicType?"/>

  <xsl:sequence select="
   ('Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat')
   [functx:day-of-week($date) + 1]
 "/>

</xsl:function>

Examples

XSLT ExampleResults
functx:day-of-week-abbrev-en(
     xs:date('2004-11-04'))
Thurs
functx:day-of-week-abbrev-en('2004-11-04')
Thurs

Depends On

functx:day-of-weekThe day of the week, from a date

See Also

functx:day-of-weekThe day of the week, from a date
functx:day-of-week-name-enThe name of the day of the week, from a date, in English

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26Priscilla Walmsley, Datypic, pwalmsley@datypic.com, http://www.datypic.com
Need XSLT Help?
D A T Y P I C
Training | Consulting | Development

XQuery by Priscilla WalmsleyGet the book!
XQuery by Priscilla Walmsley