net.sf.saxon.value
Class CalendarValue
java.lang.Object
|
+--net.sf.saxon.value.Value
|
+--net.sf.saxon.value.AtomicValue
|
+--net.sf.saxon.value.CalendarValue
- All Implemented Interfaces:
- java.lang.Comparable, Expression, Item, java.io.Serializable
- Direct Known Subclasses:
- DateTimeValue, DateValue, TimeValue
- public abstract class CalendarValue
- extends AtomicValue
- implements java.lang.Comparable
Abstract superclass for Date, Time, and DateTime
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.value.AtomicValue |
conversionPreference, convert, convert, convert, convertToJava, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getComponent, getPrimitiveValue, getTypedValue, iterate |
Methods inherited from class net.sf.saxon.value.Value |
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
calendar
protected java.util.GregorianCalendar calendar
zoneSpecified
protected boolean zoneSpecified
CalendarValue
public CalendarValue()
add
public abstract CalendarValue add(DurationValue duration)
throws XPathException
XPathException
subtract
public SecondsDurationValue subtract(CalendarValue other)
throws XPathException
- Determine the difference between two points in time, as a duration
- Parameters:
other
- the other point in time
- Returns:
- the duration as an xdt:dayTimeDuration
- Throws:
XPathException
- for example if one value is a date and the other is a time
removeTimezone
public abstract CalendarValue removeTimezone()
throws XPathException
- Return a date, time, or dateTime with the same localized value, but
without the timezone component
- Returns:
- the result of removing the timezone
- Throws:
XPathException
setTimezone
public abstract CalendarValue setTimezone(SecondsDurationValue tz)
throws XPathException
- Return a date, time, or dateTime with the same normalized value, but
in a different timezone
- Returns:
- the date/time in the new timezone
- Throws:
XPathException