public class ParseIetfDate extends SystemFunction implements Callable
Constructor and Description |
---|
ParseIetfDate() |
Modifier and Type | Method and Description |
---|---|
ZeroOrOne<DateTimeValue> |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static boolean |
isValidTime(int hour,
int minute,
int second,
int microsecond,
int tz)
Determine whether a given time is valid
|
DateTimeValue |
parse(java.lang.String input,
XPathContext context)
Parse a supplied string to obtain a dateTime
|
int |
parseTime(java.util.List<java.lang.String> tokens,
int currentPosition,
java.util.List<TimeValue> result,
java.lang.String input)
Parse part of a string (already tokenized) to obtain a TimeValue
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
argumentArray, getGenre
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public ZeroOrOne<DateTimeValue> call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
call
in interface Function
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as Sequence objectsXPathException
- if a dynamic error occurs during the evaluation of the expressionpublic DateTimeValue parse(java.lang.String input, XPathContext context) throws XPathException
input
- a string containing the date and time in IETF formatcontext
- the XPath contextXPathException
public int parseTime(java.util.List<java.lang.String> tokens, int currentPosition, java.util.List<TimeValue> result, java.lang.String input) throws XPathException
tokens
- tokenized string containing the date and time in IETF formatcurrentPosition
- index of current tokenresult
- TimeValue produced from parsing time from tokensXPathException
public static boolean isValidTime(int hour, int minute, int second, int microsecond, int tz)
hour
- the hour (0-24)minute
- the minute (0-59)second
- the second (0-59)microsecond
- the microsecond (0-999999)tz
- the timezone displacement in minutes from UTCCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.