YearMonthMethods

final implicit class YearMonthMethods(month: YearMonth) extends AnyVal

Provides extension methods for java.time.YearMonth

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def +(months: Long): YearMonth

Gets month with specified number of months added.

Gets month with specified number of months added.

Value parameters:
months

number of months

def +(amount: TemporalAmount): YearMonth

Gets month with specified amount added.

Gets month with specified amount added.

Value parameters:
amount

temporal amount

def -(months: Long): YearMonth

Gets month with specified number of months subtracted.

Gets month with specified number of months subtracted.

Value parameters:
months

number of months

def -(amount: TemporalAmount): YearMonth

Gets month with specified amount subtracted.

Gets month with specified amount subtracted.

Value parameters:
amount

temporal amount

def atEndOfYear: YearMonth

Gets month adjusted to last month of year.

Gets month adjusted to last month of year.

def atStartOfYear: YearMonth

Gets month adjusted to first month of year.

Gets month adjusted to first month of year.

def iterateTo(end: YearMonth, step: Period): Iterator[YearMonth]

Creates iterator to end month (inclusive).

Creates iterator to end month (inclusive).

Value parameters:
end

end month

step

period by which to step

Throws:
IllegalArgumentException

if step is zero.

def iterateUntil(end: YearMonth, step: Period): Iterator[YearMonth]

Creates iterator to end month (exclusive).

Creates iterator to end month (exclusive).

Value parameters:
end

end month

step

period by which to step

def max(other: YearMonth): YearMonth

Compares to other month and returns the greater value.

Compares to other month and returns the greater value.

Value parameters:
other

other month

def min(other: YearMonth): YearMonth

Compares to other month and returns the lesser value.

Compares to other month and returns the lesser value.

Value parameters:
other

other month