Return type | Name and parameters |
---|---|
static Period
|
between(Year startInclusive, Year endExclusive)
Obtains a Period consisting of the number of years between two Year instances. |
static Period
|
between(YearMonth startInclusive, YearMonth endExclusive)
Obtains a Period consisting of the number of years and months between two YearMonth instances. |
Period
|
minus(long days)
Returns a Period that is days days shorter than this period.
|
Period
|
multiply(int scalar)
Supports the multiply operator; equivalent to calling the Period#multipliedBy(int) method. |
Period
|
negative()
Supports the unary minus operator; equivalent to calling the Period#negated() method. |
Period
|
next()
Returns a Period that is one day longer than this period. |
Period
|
plus(long days)
Returns a Period that is days days longer than this period.
|
Period
|
positive()
Supports the unary plus operator; returns a Period with all unit values positive. |
Period
|
previous()
Returns a Period that is one day shorter than this period. |
addShutdownHook
, any
, any
, asBoolean
, asType
, collect
, collect
, collect
, dump
, each
, eachMatch
, eachMatch
, eachWithIndex
, every
, every
, find
, find
, findAll
, findAll
, findIndexOf
, findIndexOf
, findIndexValues
, findIndexValues
, findLastIndexOf
, findLastIndexOf
, findResult
, findResult
, findResult
, findResult
, getAt
, getMetaClass
, getMetaPropertyValues
, getProperties
, grep
, grep
, hasProperty
, identity
, inject
, inject
, inspect
, invokeMethod
, is
, isCase
, isNotCase
, iterator
, metaClass
, print
, print
, printf
, printf
, println
, println
, println
, putAt
, respondsTo
, respondsTo
, setMetaClass
, split
, sprintf
, sprintf
, stream
, tap
, toString
, use
, use
, use
, with
, with
, withCloseable
, withMethodClosure
, withStream
, withTraits
Obtains a Period consisting of the number of years between two Year instances. The months and days of the Period will be zero. The result of this method can be a negative period if the end is before the start.
startInclusive
- the start Year, inclusive, not nullendExclusive
- the end Year, exclusive, not nullObtains a Period consisting of the number of years and months between two YearMonth instances. The days of the Period will be zero. The result of this method can be a negative period if the end is before the start.
startInclusive
- the start YearMonth, inclusive, not nullendExclusive
- the end YearMonth, exclusive, not nullReturns a Period that is days
days shorter than this period.
No normalization is performed.
days
- the number of days to decrease this Period bySupports the multiply operator; equivalent to calling the Period#multipliedBy(int) method.
scalar
- a scalar to multiply each unit bySupports the unary minus operator; equivalent to calling the Period#negated() method.
Returns a Period that is one day longer than this period. No normalization is performed.
Returns a Period that is days
days longer than this period.
No normalization is performed.
days
- the number of days to increase this Period bySupports the unary plus operator; returns a Period with all unit values positive. For example, a period of "2 years, -3 months, and -4 days" would result in a period of "2 years, 3 months, and 4 days." No normalization is performed.