Version: 1 Status: new User Page: index.html XML Definition: date.format-date.xml Function Package: date.format-date.zip Function Syntaxstring date:format-date(string, string, string?)
The date:format-date function formats a date/time according to a pattern.
The first argument to date:format-date specifies the date/time to be formatted. It must be right or left-truncated date/time strings in one of the formats defined in [XML Schema Part 2: Datatypes]. The permitted formats are as follows:
The second argument is a string that gives the format pattern used to format the date. The format pattern is interpreted according to the date format (declared by date:date-format ) named by the third argument, or the default date format if there is no third argument. For details about how the format pattern is constructed and used, see date:date-format ).
If the date/time format is right-truncated (i.e. in a format other than xs:time , or xs:dateTime ) then any missing components are assumed to be as follows: if no month is specified, it is given a month of 01 ; if no day is specified, it is given a day of 01 ; if no time is specified, it is given a time of 00:00:00 .
If the date/time format is left-truncated (i.e. xs:time , xs:gMonthDay , xs:gMonth or xs:gDay ) and the format pattern has a token that uses a component that is missing from the date/time format used, then that token is replaced with an empty string ('' ) within the result.
An implementation of this extension
function
in the EXSLT date namespace must conform to the behaviour described in this document.
ImplementationsNo XSLT processors that we know of have built-in support for date:format-date . There are currently no third-party implementations of date:format-date . Change HistorySubmitted: 2001-05-12 Creator:
Jeni Tennison
(http://www.jenitennison.com/)
Formats a date/time string according to a format string, using a particular date format.
|