The main API for dates, times, instants, and durations.
-
Combines this year with a month to create a YearMonth
.
Combines this year with a month to create a YearMonth
.
Obtains an instance of YearMonth
from a temporal object.
Returns a copy of this year-month with the specified amount subtracted.
Returns a copy of this year-month with the specified amount subtracted.
Returns a copy of this YearMonth
with the specified number of months subtracted.
Returns a copy of this YearMonth
with the specified number of years subtracted.
Obtains the current year-month from the system clock in the default time-zone.
Obtains the current year-month from the specified clock.
Obtains the current year-month from the system clock in the specified time-zone.
YearMonth.of(int year,
int month)
Obtains an instance of YearMonth
from a year and month.
YearMonth.of(int year,
Month month)
Obtains an instance of YearMonth
from a year and month.
Obtains an instance of YearMonth
from a text string such as 2007-12
.
Obtains an instance of YearMonth
from a text string using a specific formatter.
Returns a copy of this year-month with the specified amount added.
Returns a copy of this year-month with the specified amount added.
Returns a copy of this YearMonth
with the specified number of months added.
Returns a copy of this YearMonth
with the specified number of years added.
Returns an adjusted copy of this year-month.
Returns a copy of this year-month with the specified field set to a new value.
Returns a copy of this YearMonth
with the month-of-year altered.
Returns a copy of this YearMonth
with the year altered.
int
Compares this year-month to another year-month.
boolean
Checks if this year-month is after the specified year-month.
boolean
Checks if this year-month is before the specified year-month.