Language

ZonedDateTime.WithMinute(Int32) Method

Definition

Returns a copy of this ZonedDateTime with the minute-of-hour altered.

[Android.Runtime.Register("withMinute", "(I)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public Java.Time.ZonedDateTime? WithMinute(int minute);
[<Android.Runtime.Register("withMinute", "(I)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
member this.WithMinute : int -> Java.Time.ZonedDateTime

Parameters

minute
Int32

the minute-of-hour to set in the result, from 0 to 59

Returns

a ZonedDateTime based on this date-time with the requested minute, not null

Attributes

Remarks

Returns a copy of this ZonedDateTime with the minute-of-hour altered. This operates on the local time-line, changing the time of the local date-time. This is then converted back to a ZonedDateTime, using the zone ID to obtain the offset. When converting back to ZonedDateTime, if the local date-time is in an overlap, then the offset will be retained if possible, otherwise the earlier offset will be used. If in a gap, the local date-time will be adjusted forward by the length of the gap. This instance is immutable and unaffected by this method call.

Java reference for java.time.ZonedDateTime.withMinute.

Applies to