LocalDate Class

Definition

A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.

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

Remarks

A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.

LocalDate is an immutable date-time object that represents a date, often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a LocalDate.

This class does not store or represent a time or time-zone. Instead, it is a description of the date, as used for birthdays. It cannot represent an instant on the time-line without additional information such as an offset or time-zone.

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.LocalDate.

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

Chronology
Class

Returns the runtime class of this Object.

(Inherited from Object)
DayOfMonth

Gets the day-of-month field.

DayOfWeek
DayOfYear

Gets the day-of-year field.

Epoch
Era
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsLeapYear

Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Max
Min
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)
Year

Gets the year field.

Methods

AdjustInto(ITemporal)
AtStartOfDay()
AtStartOfDay(ZoneId)
AtTime(Int32, Int32)
AtTime(Int32, Int32, Int32)
AtTime(Int32, Int32, Int32, Int32)
AtTime(LocalTime)
AtTime(OffsetTime)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(IChronoLocalDate)
CompareTo(Object)
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(IChronoLocalDate)
IsBefore(IChronoLocalDate)
IsEqual(IChronoLocalDate)
IsSupported(ITemporalField)
IsSupported(ITemporalUnit)
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)
LengthOfMonth()

Returns the length of the month represented by this date.

LengthOfYear()

Returns the length of the year represented by this date.

Minus(Int64, ITemporalUnit)
Minus(ITemporalAmount)
MinusDays(Int64)
MinusMonths(Int64)
MinusWeeks(Int64)
MinusYears(Int64)
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, Int32)
Of(Int32, Month, Int32)
OfEpochDay(Int64)
OfInstant(Instant, ZoneId)
OfYearDay(Int32, Int32)
Parse(ICharSequence)
Parse(ICharSequence, DateTimeFormatter)
Parse(String)
Parse(String, DateTimeFormatter)
Plus(Int64, ITemporalUnit)
Plus(ITemporalAmount)
PlusDays(Int64)
PlusMonths(Int64)
PlusWeeks(Int64)
PlusYears(Int64)
Query(ITemporalQuery)
Range(ITemporalField)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToEpochDay()
ToEpochSecond(LocalTime, ZoneOffset)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Until(IChronoLocalDate)
Until(ITemporal, ITemporalUnit)
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)

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, 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)
With(ITemporalAdjuster)
With(ITemporalField, Int64)
WithDayOfMonth(Int32)
WithDayOfYear(Int32)
WithMonth(Int32)
WithYear(Int32)

Explicit Interface Implementations

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