Language

LocalDate.AtStartOfDay Method

Definition

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 a zoned date-time from this date at the earliest valid time according to the rules in the time-zone.

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 a zoned date-time from this date at the earliest valid time according to the rules in the time-zone.

[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 zoned date-time formed from this date and the earliest valid time for the zone, not null

Attributes

Remarks

Returns a zoned date-time from this date at the earliest valid time 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 instant just after the gap. 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.

Applies to