.. _functx_day-of-week: ================== functx:day-of-week ================== The day of the week, from a date Description ~~~~~~~~~~~ The functx:day-of-week function returns the day of the week of $date as a number, where 0 is Sunday, 1 is 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. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - date:date() - the date Examples ~~~~~~~~ .. list-table:: :widths: 25 25 50 :header-rows: 1 * - **XPath** - **Results** - **Explanation** * - functx:day-of-week(xs:date('2004-11-04')) - 4 - Thursday * - functx:day-of-week(xs:dateTime('2004-11-04T12:00:13')) - 4 - Thursday * - functx:day-of-week('2004-11-04') - 4 - Thursday See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_day-of-week-name-en`. * :ref:`functx_day-of-week-abbrev-en`.