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

Constructor Summary
CalendarValue()
           
 
Method Summary
 CalendarValue add(DurationValue duration)
           
abstract  CalendarValue removeTimezone()
          Return a date, time, or dateTime with the same localized value, but without the timezone component
abstract  CalendarValue setTimezone(SecondsDurationValue tz)
          Return a date, time, or dateTime with the same normalized value, but in a different timezone
 DurationValue subtract(CalendarValue duration)
           
 
Methods inherited from class net.sf.saxon.value.AtomicValue
convert, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getComponent, getTypedValue, iterate
 
Methods inherited from class net.sf.saxon.value.Value
analyze, asItem, asValue, collapseWhitespace, conversionPreference, convertToJava, 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
 
Methods inherited from interface net.sf.saxon.om.Item
getItemType, getStringValue
 
Methods inherited from interface net.sf.saxon.expr.Expression
display, getItemType
 

Constructor Detail

CalendarValue

public CalendarValue()
Method Detail

add

public CalendarValue add(DurationValue duration)
                  throws XPathException
XPathException

subtract

public DurationValue subtract(CalendarValue duration)
                       throws XPathException
XPathException

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