xdmp.parseDateTime( $picture as String, $value as String, [$language as String?], [$calendar as String?], [$country as String?] ) as Date
The desired string representation of the given |
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
The given string |
|$language||The language used in string representation of the date, time or dateTime value.|
|$calendar||This argument is reserved for future use. The only calendar supported at this point is "Gregorian" or "AD".|
|$country||$country is used to take into account if there any country specific interpretation of the string while converting it into dateTime value.|
Dates before October 15, 1582 (the start of the Gregorian calendar) will not return the correct dateTime value.
xdmp:parse-dateTime function will not parse all dates;
if it does not parse a date, it can throw the
XDMP-PATTERNVALUEMISMATCH exception. To help normalize
the dates so they can be parsed, you can try using the XSLT functions
defined in the following stylesheet:
In particular xdmp:parse-dateTime does not support parsing names of days or months.
xdmp.parseDateTime("[Y0001]-[M01]-[D01]T[h01]:[m01]:[s01].[f1][Z]", "2014-01-06T17:13:50.873594-08:00") => 2014-01-06T17:13:50.874-08:00