OffsetDateTime.Of Method
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.
Overloads
| Name | Description |
|---|---|
| Of(LocalDate, LocalTime, ZoneOffset) |
Obtains an instance of OffsetDateTime from a date, time and offset. |
| Of(Int32, Int32, Int32, Int32, Int32, Int32, Int32, ZoneOffset) |
Obtains an instance of OffsetDateTime from a year, month, day, hour, minute, second, nanosecond and offset. |
| Of(LocalDateTime, ZoneOffset) |
Obtains an instance of OffsetDateTime from a date-time and offset. |
Of(LocalDate, LocalTime, ZoneOffset)
Obtains an instance of OffsetDateTime from a date, time and offset.
[Android.Runtime.Register("of", "(Ljava/time/LocalDate;Ljava/time/LocalTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public static Java.Time.OffsetDateTime? Of(Java.Time.LocalDate? date, Java.Time.LocalTime? time, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(Ljava/time/LocalDate;Ljava/time/LocalTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
static member Of : Java.Time.LocalDate * Java.Time.LocalTime * Java.Time.ZoneOffset -> Java.Time.OffsetDateTime
Parameters
- date
- LocalDate
the local date, not null
- time
- LocalTime
the local time, not null
- offset
- ZoneOffset
the zone offset, not null
Returns
the offset date-time, not null
- Attributes
Remarks
To be added.
Java reference for java.time.OffsetDateTime.of.
Applies to
Of(Int32, Int32, Int32, Int32, Int32, Int32, Int32, ZoneOffset)
Obtains an instance of OffsetDateTime from a year, month, day, hour, minute, second, nanosecond and offset.
[Android.Runtime.Register("of", "(IIIIIIILjava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public static Java.Time.OffsetDateTime? Of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(IIIIIIILjava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
static member Of : int * int * int * int * int * int * int * Java.Time.ZoneOffset -> Java.Time.OffsetDateTime
Parameters
- year
- Int32
the year to represent, from MIN_YEAR to MAX_YEAR
- month
- Int32
the month-of-year to represent, from 1 (January) to 12 (December)
- dayOfMonth
- Int32
the day-of-month to represent, from 1 to 31
- hour
- Int32
the hour-of-day to represent, from 0 to 23
- minute
- Int32
the minute-of-hour to represent, from 0 to 59
- second
- Int32
the second-of-minute to represent, from 0 to 59
- nanoOfSecond
- Int32
the nano-of-second to represent, from 0 to 999,999,999
- offset
- ZoneOffset
the zone offset, not null
Returns
the offset date-time, not null
- Attributes
Remarks
To be added.
Java reference for java.time.OffsetDateTime.of.
Applies to
Of(LocalDateTime, ZoneOffset)
Obtains an instance of OffsetDateTime from a date-time and offset.
[Android.Runtime.Register("of", "(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public static Java.Time.OffsetDateTime? Of(Java.Time.LocalDateTime? dateTime, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
static member Of : Java.Time.LocalDateTime * Java.Time.ZoneOffset -> Java.Time.OffsetDateTime
Parameters
- dateTime
- LocalDateTime
the local date-time, not null
- offset
- ZoneOffset
the zone offset, not null
Returns
the offset date-time, not null
- Attributes
Remarks
Obtains an instance of OffsetDateTime from a date-time and offset. This creates an offset date-time with the specified local date-time and offset.
Java reference for java.time.OffsetDateTime.of.