|
|
xdmp:parse-dateTime(
|
|
$picture as xs:string,
|
|
$value as xs:string,
|
|
[$language as xs:string],
|
|
[$calendar as xs:string],
|
|
[$country as xs:string]
|
| ) as xs:dateTime |
|
 |
Summary:
Parses a string containing date, time or dateTime using the supplied
picture argument and returns a dateTime value. While this function
is closely related to other XSLT functions, it is available in XSLT
as well as in all XQuery dialects.
|
Parameters:
$picture
:
The desired string representation of the given $value.
The picture string is a sequence of characters, in which the
characters represent variables such as, decimal-separator-sign,
grouping-sign, zero-digit-sign, digit-sign, pattern-separator,
percent sign and per-mille-sign. For details on the picture string, see
http://www.w3.org/TR/xslt20/#date-picture-string.
This follows the specification of
picture string in the W3C XSLT 2.0
specification for the fn:format-dateTime function.
Symbol Description
-----------------------------------
'Y' year(absolute value)
'M' month in year
'D' day in month
'd' day in year
'F' day of week
'W' week in year
'w' week in month
'H' hour in day
'h' hour in half-day
'P' am/pm marker
'm' minute in hour
's' second in minute
'f' fractional seconds
'Z' timezone as a time offset from UTC
for example PST
'z' timezone as an offset using GMT,
for example GMT+1
|
$value
:
The given string $value representing the dateTime value
that needs to be formatted.
|
$language
(optional):
The language used in string representation of the date, time or
dateTime value.
|
$calendar
(optional):
This argument is reserved for future use. The only calendar supported
at this point is "Gregorian" or "AD".
|
$country
(optional):
$country is used to take into account if there any country specific
interpretation of the string while converting it into dateTime value.
|
|
Usage Notes:
Dates before October 15, 1582 (the start of the Gregorian calendar) will
not return the correct dateTime value.
|
Example:
xdmp:parse-dateTime("[Y0001]-[M01]-[D01]T[h01]:[m01]:[s01].[f1][Z]","2010-01-06T17:13:50.873594-08:00")
|
|
|
|
xdmp:parse-yymmdd(
|
|
$picture as xs:string,
|
|
$value as xs:string,
|
|
[$language as xs:string],
|
|
[$calendar as xs:string],
|
|
[$country as xs:string]
|
| ) as xs:dateTime |
|
 |
Summary:
Parses a string containing date, time or dateTime using the supplied
picture argument and returns a dateTime value. While this function
is closely related to other XSLT functions, it is available in XSLT
as well as in all XQuery dialects.
|
Parameters:
$picture
:
The desired string representation of the given $value.
This follows the specification of picture string which is
compatible to the format specification in icu. See "http://icu-project.org/apiref/classSimpleDateFormat.html" for more details.
Here is the summary of the formatting symbols:
Symbol Description
----------------------------
"y" year(absolute value)
"M" month in year
"d" day in month
"D" day in year
"E" day of week
"w" week in year
"W" week in month
"H" hour in day
"K" hour in half-day
"a" am/pm marker
"s" second in minute
"S" fractional seconds
"Z" timezone as a time offset from UTC
for example PST
"ZZZZ" timezone as an offset using GMT,
for example GMT+1
|
$value
:
The given string $value that needs to be formatted.
|
$language
(optional):
The language used in string representation of the date, time or
dateTime value.
|
$calendar
(optional):
This argument is reserved for future use. The only calendar supported
at this point is "Gregorian" or "AD".
|
$country
(optional):
$country is used to take into account if there any country specific
interpretation of the string while converting it into dateTime value.
|
|
Usage Notes:
Dates before October 15, 1582 (the start of the Gregorian calendar) will
not return the correct dateTime value.
|
Example:
xdmp:parse-yymmdd("yyyy-MM-ddThh:mm:ss.Sz","2010-01-06T17:13:50.873594-8.00")
|
|
|
|
xdmp:QName-from-key(
|
|
$key as xs:string
|
| ) as xs:QName |
|
 |
Summary:
Construct a QName from a string of the form "{namespaceURI}localname".
This function is useful for constructing Clark notation
parameters for the xdmp:xslt-eval
and xdmp:xslt-invoke
functions.
|
Parameters:
$key
:
The string from which to construct a QName.
|
|
Example:
xquery version "1.0-ml";
(: returns the Clark notation form of the QName :)
xdmp:key-from-QName(xs:QName("fn:foo"))
=>
{http://www.w3.org/2005/xpath-functions}foo
|
|
|