YearMonth.WithMonth(Int32) 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.
Returns a copy of this YearMonth with the month-of-year altered.
[Android.Runtime.Register("withMonth", "(I)Ljava/time/YearMonth;", "", ApiSince=26)]
public Java.Time.YearMonth? WithMonth(int month);
[<Android.Runtime.Register("withMonth", "(I)Ljava/time/YearMonth;", "", ApiSince=26)>]
member this.WithMonth : int -> Java.Time.YearMonth
Parameters
- month
- Int32
the month-of-year to set in the returned year-month, from 1 (January) to 12 (December)
Returns
a YearMonth based on this year-month with the requested month, not null
- Attributes
Remarks
Returns a copy of this YearMonth with the month-of-year altered. This instance is immutable and unaffected by this method call.
Java reference for java.time.YearMonth.withMonth.