LocalDate.AtStartOfDay 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 |
|---|---|
| AtStartOfDay() |
Combines this date with the time of midnight to create a LocalDateTime at the start of this date. |
| AtStartOfDay(ZoneId) |
Returns the earliest valid zoned date-time at or after the start of this date. |
AtStartOfDay()
Combines this date with the time of midnight to create a LocalDateTime at the start of this date.
[Android.Runtime.Register("atStartOfDay", "()Ljava/time/LocalDateTime;", "", ApiSince=26)]
public Java.Time.LocalDateTime? AtStartOfDay();
[<Android.Runtime.Register("atStartOfDay", "()Ljava/time/LocalDateTime;", "", ApiSince=26)>]
member this.AtStartOfDay : unit -> Java.Time.LocalDateTime
Returns
the local date-time of midnight at the start of this date, not null
- Attributes
Remarks
Combines this date with the time of midnight to create a LocalDateTime at the start of this date. This returns a LocalDateTime formed from this date at the time of midnight, 00:00, at the start of this date.
Java reference for java.time.LocalDate.atStartOfDay.
Applies to
AtStartOfDay(ZoneId)
Returns the earliest valid zoned date-time at or after the start of this date.
[Android.Runtime.Register("atStartOfDay", "(Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public Java.Time.ZonedDateTime? AtStartOfDay(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("atStartOfDay", "(Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
member this.AtStartOfDay : Java.Time.ZoneId -> Java.Time.ZonedDateTime
Parameters
- zone
- ZoneId
the zone ID to use, not null
Returns
the earliest valid zoned date-time at or after the start of this date, not null
- Attributes
Remarks
Returns the earliest valid zoned date-time at or after the start of this date according to the rules in the time-zone. Time-zone rules, such as daylight savings, mean that not every local date-time is valid for the specified zone, thus the local date-time may not be midnight. In most cases, there is only one valid offset for a local date-time. In the case of an overlap, there are two valid offsets, and the earlier one is used, corresponding to the first occurrence of midnight on the date. In the case of a gap, the zoned date-time will represent the first valid instant after the gap. If a gap removes the entire date, the result falls on a later date. If the zone ID is a ZoneOffset, then the result always has a time of midnight. To convert to a specific time in a given time-zone call atTime(LocalTime) followed by LocalDateTime.atZone(ZoneId).
Java reference for java.time.LocalDate.atStartOfDay.