IChronoZonedDateTime Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
[Android.Runtime.Register("java/time/chrono/ChronoZonedDateTime", "", "Java.Time.Chrono.IChronoZonedDateTimeInvoker", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "D extends java.time.chrono.ChronoLocalDate" })]
public interface IChronoZonedDateTime : IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable, Java.Time.Temporal.ITemporal
[<Android.Runtime.Register("java/time/chrono/ChronoZonedDateTime", "", "Java.Time.Chrono.IChronoZonedDateTimeInvoker", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "D extends java.time.chrono.ChronoLocalDate" })>]
type IChronoZonedDateTime = interface
interface IComparable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface ITemporal
interface ITemporalAccessor
- Derived
- Attributes
- Implements
Remarks
A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
<b>Most applications should declare method signatures, fields and variables as ZonedDateTime, not this interface.</b>
A ChronoZonedDateTime is the abstract representation of an offset date-time where the Chronology chronology, or calendar system, is pluggable. The date-time is defined in terms of fields expressed by TemporalField, where most common implementations are defined in ChronoField. The chronology defines how the calendar system operates and the meaning of the standard fields.
<h2>When to use this interface</h2> The design of the API encourages the use of ZonedDateTime rather than this interface, even in the case where the application needs to deal with multiple calendar systems. The rationale for this is explored in detail in ChronoLocalDate.
Ensure that the discussion in ChronoLocalDate has been read and understood before using this interface.
Added in 1.8.
Java documentation for java.time.chrono.ChronoZonedDateTime.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Properties
| Name | Description |
|---|---|
| Chronology |
Gets the chronology of this date-time. |
| Handle |
Gets the JNI value of the underlying Android object. (Inherited from IJavaObject) |
| JniIdentityHashCode |
Returns the value of |
| JniManagedPeerState |
State of the managed peer. (Inherited from IJavaPeerable) |
| JniObjectReferenceControlBlock | (Inherited from IJavaPeerable) |
| JniPeerMembers |
Member access and invocation support. (Inherited from IJavaPeerable) |
| Offset |
Gets the zone offset, such as '+01:00'. |
| PeerReference |
Returns a JniObjectReference of the wrapped Java object instance. (Inherited from IJavaPeerable) |
| Zone |
Gets the zone ID, such as 'Europe/Paris'. |
Methods
| Name | Description |
|---|---|
| CompareTo(IChronoZonedDateTime) |
Compares this date-time to another date-time, including the chronology. |
| CompareTo(Object) |
Compares this object with the specified object for order. (Inherited from IComparable) |
| Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
| DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
| Equals(Object) |
Checks if this date-time is equal to another date-time. |
| Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
| Format(DateTimeFormatter) |
Formats this date-time using the specified formatter. |
| From(ITemporalAccessor) |
Obtains an instance of ChronoZonedDateTime from a temporal object. |
| Get(ITemporalField) |
Gets the value of the specified field as an |
| GetHashCode() |
A hash code for this date-time. |
| GetLong(ITemporalField) |
Gets the value of the specified field as a |
| IsAfter(IChronoZonedDateTime) |
Checks if the instant of this date-time is after that of the specified date-time. |
| IsBefore(IChronoZonedDateTime) |
Checks if the instant of this date-time is before that of the specified date-time. |
| IsEqual(IChronoZonedDateTime) |
Checks if the instant of this date-time is equal to that of the specified date-time. |
| IsSupported(ITemporalField) |
Checks if the specified field is supported. |
| IsSupported(ITemporalUnit) |
Checks if the specified unit is supported. (Inherited from ITemporal) |
| Minus(Int64, ITemporalUnit) |
Returns an object of the same type as this object with the specified period subtracted. (Inherited from ITemporal) |
| Minus(ITemporalAmount) |
Returns an object of the same type as this object with an amount subtracted. (Inherited from ITemporal) |
| Plus(Int64, ITemporalUnit) |
Returns an object of the same type as this object with the specified period added. |
| Plus(ITemporalAmount) |
Returns an object of the same type as this object with an amount added. (Inherited from ITemporal) |
| Query(ITemporalQuery) |
Queries this date-time. (Inherited from ITemporalAccessor) |
| Range(ITemporalField) |
Gets the range of valid values for the specified field. (Inherited from ITemporalAccessor) |
| SetJniIdentityHashCode(Int32) |
Set the value returned by |
| SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
| SetPeerReference(JniObjectReference) |
Set the value returned by |
| TimeLineOrder() |
Gets a comparator that compares ChronoZonedDateTime in time-line order ignoring the chronology. |
| ToEpochSecond() |
Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z. |
| ToInstant() |
Converts this date-time to an Instant. |
| ToLocalDate() |
Gets the local date part of this date-time. |
| ToLocalDateTime() |
Gets the local date-time part of this date-time. |
| ToLocalTime() |
Gets the local time part of this date-time. |
| ToString() |
Outputs this date-time as a String. |
| UnregisterFromRuntime() |
Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations. (Inherited from IJavaPeerable) |
| Until(ITemporal, ITemporalUnit) |
Calculates the amount of time until another temporal in terms of the specified unit. (Inherited from ITemporal) |
| With(ITemporalAdjuster) |
Returns an adjusted object of the same type as this object with the adjustment made. (Inherited from ITemporal) |
| With(ITemporalField, Int64) |
Returns an object of the same type as this object with the specified field altered. |
| WithEarlierOffsetAtOverlap() |
Returns a copy of this date-time changing the zone offset to the earlier of the two valid offsets at a local time-line overlap. |
| WithLaterOffsetAtOverlap() |
Returns a copy of this date-time changing the zone offset to the later of the two valid offsets at a local time-line overlap. |
| WithZoneSameInstant(ZoneId) |
Returns a copy of this date-time with a different time-zone, retaining the instant. |
| WithZoneSameLocal(ZoneId) |
Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| ITemporal.IsSupported(ITemporalUnit) |
Checks if the specified unit is supported. |
| ITemporal.Minus(Int64, ITemporalUnit) |
Returns an object of the same type as this object with the specified period subtracted. |
| ITemporal.Minus(ITemporalAmount) |
Returns an object of the same type as this object with an amount subtracted. |
| ITemporal.Plus(ITemporalAmount) |
Returns an object of the same type as this object with an amount added. |
| ITemporal.With(ITemporalAdjuster) |
Returns an adjusted object of the same type as this object with the adjustment made. |
| ITemporalAccessor.Get(ITemporalField) | |
| ITemporalAccessor.GetLong(ITemporalField) |
Gets the value of the specified field as a long. |
| ITemporalAccessor.Query(ITemporalQuery) |
Queries this date-time using the specified query. |
| ITemporalAccessor.Range(ITemporalField) | |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |