# xslt:format-dateTime

Function signature

$value | xs:dateTime ?
$picture | xs:string
Result | xs:string

Formats a dateTime, using a format controlled by the picture string. The result is equivalent to the 5-argument form of the function, with the third, fourth, and fifth arguments set to an empty sequence.

XSLT 2.0 Specification

Function signature

$value | xs:dateTime ?
$picture | xs:string
$language | xs:string ?
$calendar | xs:string ?
$country | xs:string ?
Result | xs:string

XSLT 2.0 Specification

Formats a dateTime, using a format controlled by the picture string. If no language is specified, the value is taken from the current Java locale. If the language (explicitly supplied or defaulted) is other than "en", the system tries to locate a class named `net.sf.saxon.number.Numberer_XX` where XX is the language; this class must provide methods to perform the localization. If a calendar other than AD or ISO is specified, the result is prefixed "[Calendar: AD]" and is otherwise output as if the default calendar were used. The country argument is currently used only when the format requests output of timezones by name: for example with language="en", +01:00 is output as "BST" if country is "gb", or as "CET" if country is "eu". Note that the table of timezone names is very incomplete, and that the use of timezone names is anyway unsatisfactory because there is no knowledge of daylight-savings (summer) time.

Next