public class GYearValue extends GDateValue
GDateValue.GDateComparable
day, daysPerMonth, hasNoYearZero, month, monthData, year
MISSING_TIMEZONE, NO_TIMEZONE
typeLabel
Constructor and Description |
---|
GYearValue(int year,
int tz,
AtomicType type) |
GYearValue(int year,
int tz,
boolean xsd10) |
Modifier and Type | Method and Description |
---|---|
CalendarValue |
add(DurationValue duration)
Add a duration to this date/time value
|
CalendarValue |
adjustTimezone(int tz)
Return a new date, time, or dateTime with the same normalized value, but
in a different timezone
|
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Make a copy of this date, time, or dateTime value
|
UnicodeString |
getPrimitiveStringValue()
Convert the value to a string, using the serialization rules for the primitive type.
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
static ConversionResult |
makeGYearValue(UnicodeString value,
ConversionRules rules) |
checkValidInJavascript, compareTo, equals, getCalendar, getComponent, getDay, getMonth, getSchemaComparable, getXPathComparable, getYear, hashCode, isLeapYear, isValidDate, setLexicalValue, toDateTime
adjustTimezone, appendString, appendTimezone, appendTimezone, appendTwoDigits, asMapKey, getTimezoneInMinutes, getXMLGregorianCalendar, getXPathMatchKey, hasTimezone, identityHashCode, isIdentical, makeCalendarValue, removeTimezone, setTimezoneInMinutes, subtract
asAtomic, atomize, checkPermittedContents, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getGenre, getItemType, getLength, getUnicodeStringValue, getUType, head, isIdentical, isNaN, isUntypedAtomic, itemAt, iterate, iterator, setTypeLabel, show, toShortString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asAtomic
getStringValue, isStreamed, reduce, subsequence
asIterable, concatenate, containsNode, materialize
makeRepeatable
public GYearValue(int year, int tz, boolean xsd10)
public GYearValue(int year, int tz, AtomicType type)
public static ConversionResult makeGYearValue(UnicodeString value, ConversionRules rules)
public AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType
in class AtomicValue
typeLabel
- the type label of the new copy. The caller is responsible for checking that
the value actually conforms to this type.public BuiltInAtomicType getPrimitiveType()
getPrimitiveType
in class AtomicValue
public UnicodeString getPrimitiveStringValue()
AtomicValue
getPrimitiveStringValue
in class AtomicValue
public CalendarValue add(DurationValue duration) throws XPathException
add
in class CalendarValue
duration
- the duration to be added (which might be negative)XPathException
- if an error is detectedpublic CalendarValue adjustTimezone(int tz)
adjustTimezone
in class CalendarValue
tz
- the new timezone, in minutesCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.