- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem
- All Known Subinterfaces:
ICalendarTemporalItem,IDateItem,IDateTimeItem,IDateTimeWithTimeZoneItem,IDateWithTimeZoneItem,ITimeItem,ITimeWithTimeZoneItem
An atomic Metapath item containing a temporal data value.
-
Method Summary
Modifier and TypeMethodDescriptionintgetDay()Get the day value of this temporal.intgetHour()Get the hour value of this temporal.intGet the minute value of this temporal.intgetMonth()Get the month value of this temporal.intgetNano()Get the partial nano second value of this temporal.default IDayTimeDurationItemGet the timezone offset as a day/time duration for this temporal.intGet the whole second value of this temporal.intgetYear()Get the year value of this temporal.Get the timezone offset for this temporal.booleanhasDate()Determine if the temporal has date information.booleanhasTime()Determine if the temporal has time information.booleanDetermine if the temporal item has a timezone.replaceTimezone(IDayTimeDurationItem offset) Adjusts a temporal item value to a specific timezone, or to no timezone at all.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, asStringItem, atomize, castAsType, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, getType, hasValue, toSequence
-
Method Details
-
getYear
int getYear()Get the year value of this temporal.- Returns:
- the year value
-
getMonth
int getMonth()Get the month value of this temporal.- Returns:
- the month value
-
getDay
int getDay()Get the day value of this temporal.- Returns:
- the day value
-
getHour
int getHour()Get the hour value of this temporal.- Returns:
- the hour value
-
getMinute
int getMinute()Get the minute value of this temporal.- Returns:
- the minute value
-
getSecond
int getSecond()Get the whole second value of this temporal.- Returns:
- the whole second value
-
getNano
int getNano()Get the partial nano second value of this temporal.- Returns:
- the partial nano second value
-
getZoneOffset
Get the timezone offset for this temporal.- Returns:
- the timezone offset if specified or
nullif the timezone is not known - See Also:
-
getOffset
Get the timezone offset as a day/time duration for this temporal.- Returns:
- the timezone offset if specified or
nullif the timezone is not known - See Also:
-
hasTimezone
boolean hasTimezone()Determine if the temporal item has a timezone.- Returns:
trueif the temporal item has a timezone orfalseotherwise
-
hasDate
boolean hasDate()Determine if the temporal has date information.- Returns:
trueif the temporal item has date information orfalseotherwise
-
hasTime
boolean hasTime()Determine if the temporal has time information.- Returns:
trueif the temporal item has time information orfalseotherwise
-
replaceTimezone
Adjusts a temporal item value to a specific timezone, or to no timezone at all.- Parameters:
offset- the timezone offset to use ornull- Returns:
- the adjusted temporal value
- Throws:
DateTimeFunctionException- with codeDateTimeFunctionException.INVALID_TIME_ZONE_VALUE_ERRORif the offset is < -PT14H or > PT14H
-