\duncan3dc\Dates\TraitsRange

Common functionality applied to ranges that are constrained in some way (eg, month, year, etc)

Summary

Methods
Properties
Constants
now()
addMonths()
subMonths()
addYears()
subYears()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

now()

now() : static

Create a new range object representing the current date.

Returns

static

addMonths()

addMonths(integer  $months) : static

Get a new Range object for the specified number of months difference.

Parameters

integer $months

The number of months to add

Returns

static

subMonths()

subMonths(integer  $months) : static

Get a new Range object for the specified number of months difference.

Parameters

integer $months

The number of months to subtract

Returns

static

addYears()

addYears(integer  $years) : static

Get a new Range object for the specified number of years difference.

Parameters

integer $years

The number of years to add

Returns

static

subYears()

subYears(integer  $years) : static

Get a new Range object for the specified number of years difference.

Parameters

integer $years

The number of years to subtract

Returns

static