trait Boundaries

Trait Boundaries.

startOf, endOf and derived method for each unit.

Depends on the following properties:

Properties

int $year
int $month
int $daysInMonth
int $quarter Depends on the following methods:

Methods

startOfDay()

Resets the time to 00:00:00 start of day

endOfDay()

Resets the time to 23:59:59.999999 end of day

startOfMonth()

Resets the date to the first day of the month and the time to 00:00:00

endOfMonth()

Resets the date to end of the month and time to 23:59:59.999999

startOfQuarter()

Resets the date to the first day of the quarter and the time to 00:00:00

endOfQuarter()

Resets the date to end of the quarter and time to 23:59:59.999999

startOfYear()

Resets the date to the first day of the year and the time to 00:00:00

endOfYear()

Resets the date to end of the year and time to 23:59:59.999999

startOfDecade()

Resets the date to the first day of the decade and the time to 00:00:00

endOfDecade()

Resets the date to end of the decade and time to 23:59:59.999999

startOfCentury()

Resets the date to the first day of the century and the time to 00:00:00

endOfCentury()

Resets the date to end of the century and time to 23:59:59.999999

startOfMillennium()

Resets the date to the first day of the millennium and the time to 00:00:00

endOfMillennium()

Resets the date to end of the millennium and time to 23:59:59.999999

startOfWeek(int$weekStartsAt =null)

Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00

endOfWeek(int$weekEndsAt =null)

Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999

startOfHour()

Modify to start of current hour, minutes and seconds become 0

endOfHour()

Modify to end of current hour, minutes and seconds become 59

startOfMinute()

Modify to start of current minute, seconds become 0

endOfMinute()

Modify to end of current minute, seconds become 59

startOfSecond()

Modify to start of current second, microseconds become 0

endOfSecond()

Modify to end of current second, microseconds become 999999

startOf(string$unit,array...$params)

Modify to start of current given unit.

endOf(string$unit,array...$params)

Modify to end of current given unit.

Details

at line46
Boundaries startOfDay()

Resets the time to 00:00:00 start of day

Return Value

Boundaries

at line61
Boundaries endOfDay()

Resets the time to 23:59:59.999999 end of day

Return Value

Boundaries

at line76
Boundaries startOfMonth()

Resets the date to the first day of the month and the time to 00:00:00

Return Value

Boundaries

at line91
Boundaries endOfMonth()

Resets the date to end of the month and time to 23:59:59.999999

Return Value

Boundaries

at line106
Boundaries startOfQuarter()

Resets the date to the first day of the quarter and the time to 00:00:00

Return Value

Boundaries

at line123
Boundaries endOfQuarter()

Resets the date to end of the quarter and time to 23:59:59.999999

Return Value

Boundaries

at line138
Boundaries startOfYear()

Resets the date to the first day of the year and the time to 00:00:00

Return Value

Boundaries

at line153
Boundaries endOfYear()

Resets the date to end of the year and time to 23:59:59.999999

Return Value

Boundaries

at line168
Boundaries startOfDecade()

Resets the date to the first day of the decade and the time to 00:00:00

Return Value

Boundaries

at line185
Boundaries endOfDecade()

Resets the date to end of the decade and time to 23:59:59.999999

Return Value

Boundaries

at line202
Boundaries startOfCentury()

Resets the date to the first day of the century and the time to 00:00:00

Return Value

Boundaries

at line219
Boundaries endOfCentury()

Resets the date to end of the century and time to 23:59:59.999999

Return Value

Boundaries

at line236
Boundaries startOfMillennium()

Resets the date to the first day of the millennium and the time to 00:00:00

Return Value

Boundaries

at line253
Boundaries endOfMillennium()

Resets the date to end of the millennium and time to 23:59:59.999999

Return Value

Boundaries

at line274
Boundaries startOfWeek(int$weekStartsAt =null)

Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00

Parameters

int $weekStartsAt optional start allow you to specify the day of week to use to start the week

Return Value

Boundaries

at line293
Boundaries endOfWeek(int$weekEndsAt =null)

Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999

Parameters

int $weekEndsAt optional start allow you to specify the day of week to use to end the week

Return Value

Boundaries

at line308
Boundaries startOfHour()

Modify to start of current hour, minutes and seconds become 0

Return Value

Boundaries

at line323
Boundaries endOfHour()

Modify to end of current hour, minutes and seconds become 59

Return Value

Boundaries

at line338
Boundaries startOfMinute()

Modify to start of current minute, seconds become 0

Return Value

Boundaries

at line353
Boundaries endOfMinute()

Modify to end of current minute, seconds become 59

Return Value

Boundaries

at line370
Boundaries startOfSecond()

Modify to start of current second, microseconds become 0

Return Value

Boundaries

at line387
Boundaries endOfSecond()

Modify to end of current second, microseconds become 999999

Return Value

Boundaries

at line407
Boundaries startOf(string$unit,array...$params)

Modify to start of current given unit.

Parameters

string $unit
array ...$params mixed> $params

Return Value

Boundaries

at line433
Boundaries endOf(string$unit,array...$params)

Modify to end of current given unit.

Parameters

string $unit
array ...$params mixed> $params

Return Value

Boundaries