Sdílet prostřednictvím


MonthDay Class

Definition

A month-day in the ISO-8601 calendar system, such as --12-03.

[Android.Runtime.Register("java/time/MonthDay", ApiSince=26, DoNotGenerateAcw=true)]
public sealed class MonthDay : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Lang.IComparable, Java.Time.Temporal.ITemporalAccessor, Java.Time.Temporal.ITemporalAdjuster
[<Android.Runtime.Register("java/time/MonthDay", ApiSince=26, DoNotGenerateAcw=true)>]
type MonthDay = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IComparable
    interface ITemporalAccessor
    interface ITemporalAdjuster
Inheritance
MonthDay
Attributes
Implements

Remarks

A month-day in the ISO-8601 calendar system, such as --12-03.

MonthDay is an immutable date-time object that represents the combination of a month and day-of-month. Any field that can be derived from a month and day, such as quarter-of-year, can be obtained.

This class does not store or represent a year, time or time-zone. For example, the value "December 3rd" can be stored in a MonthDay.

Since a MonthDay does not possess a year, the leap day of February 29th is considered valid.

This class implements TemporalAccessor rather than Temporal. This is because it is not possible to define whether February 29th is valid or not without external information, preventing the implementation of plus/minus. Related to this, MonthDay only provides access to query and set the fields MONTH_OF_YEAR and DAY_OF_MONTH.

The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. It is equivalent to the proleptic Gregorian calendar system, in which today's rules for leap years are applied for all time. For most applications written today, the ISO-8601 rules are entirely suitable. However, any application that makes use of historical dates, and requires them to be accurate will find the ISO-8601 approach unsuitable.

Added in 1.8.

Java documentation for java.time.MonthDay.

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

Class

Returns the runtime class of this Object.

(Inherited from Object)
DayOfMonth

Gets the day-of-month field.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Month
MonthValue

Gets the month-of-year field from 1 to 12.

PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

AdjustInto(ITemporal)
AtYear(Int32)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(MonthDay)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Format(DateTimeFormatter)
From(ITemporalAccessor)
Get(ITemporalField)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetLong(ITemporalField)
IsAfter(MonthDay)
IsBefore(MonthDay)
IsSupported(ITemporalField)
IsValidYear(Int32)

Checks if the year is valid for this month-day.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Now()
Now(Clock)
Now(ZoneId)
Of(Int32, Int32)
Of(Month, Int32)
Parse(ICharSequence, DateTimeFormatter)
Parse(ICharSequence)
Parse(String, DateTimeFormatter)
Parse(String)
Query(ITemporalQuery)
Range(ITemporalField)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
With(Month)
WithDayOfMonth(Int32)
WithMonth(Int32)

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to