LocalDateTime Class
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 without a time-zone in the ISO-8601 calendar system,
such as 2007-12-03T10:15:30
.
[Android.Runtime.Register("java/time/LocalDateTime", ApiSince=26, DoNotGenerateAcw=true)]
public sealed class LocalDateTime : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Time.Chrono.IChronoLocalDateTime
[<Android.Runtime.Register("java/time/LocalDateTime", ApiSince=26, DoNotGenerateAcw=true)>]
type LocalDateTime = class
inherit Object
interface ISerializable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface IChronoLocalDateTime
interface IComparable
interface ITemporal
interface ITemporalAccessor
interface ITemporalAdjuster
- Inheritance
- Attributes
- Implements
Remarks
A date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30
.
LocalDateTime
is an immutable date-time object that represents a date-time, often viewed as year-month-day-hour-minute-second. Other date and time fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. Time is represented to nanosecond precision. For example, the value "2nd October 2007 at 13:45.30.123456789" can be stored in a LocalDateTime
.
This class does not store or represent a time-zone. Instead, it is a description of the date, as used for birthdays, combined with the local time as seen on a wall clock. 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.LocalDateTime
.
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 |
DayOfMonth |
Gets the day-of-month field. |
DayOfWeek | |
DayOfYear |
Gets the day-of-year field. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Hour |
Gets the hour-of-day field. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
Max | |
Min | |
Minute |
Gets the minute-of-hour field. |
Month | |
MonthValue |
Gets the month-of-year field from 1 to 12. |
Nano |
Gets the nano-of-second field. |
PeerReference | (Inherited from Object) |
Second |
Gets the second-of-minute field. |
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
Explicit Interface Implementations
IChronoLocalDateTime.AtZone(ZoneId) | |
IChronoLocalDateTime.Plus(Int64, ITemporalUnit) | |
IChronoLocalDateTime.ToLocalDate() | |
IChronoLocalDateTime.With(ITemporalField, Int64) | |
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) |