YearMonthType

final class YearMonthType(month: YearMonth) extends AnyVal

Provides extension methods to 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 Params
months

number of months

def +(amount: TemporalAmount): YearMonth

Gets month with specified amount added.

Gets month with specified amount added.

Value Params
amount

temporal amount

def -(months: Long): YearMonth

Gets month with specified number of months subtracted.

Gets month with specified number of months subtracted.

Value Params
months

number of months

def -(amount: TemporalAmount): YearMonth

Gets month with specified amount subtracted.

Gets month with specified amount subtracted.

Value Params
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 Params
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 Params
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 Params
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 Params
other

other month