Boundaries
Trait Boundaries.
startOf, endOf and derived method for each unit.
Depends on the following properties:
Table of Contents
Properties
- $daysInMonth : int
- $month : int
- $quarter : int
- $year : int
Methods
- addMonths() : $this
- endOf() : static
- Modify to end of current given unit.
- endOfCentury() : static
- Resets the date to end of the century and time to 23:59:59.999999
- endOfDay() : static
- Resets the time to 23:59:59.999999 end of day
- endOfDecade() : static
- Resets the date to end of the decade and time to 23:59:59.999999
- endOfHour() : static
- Modify to end of current hour, minutes and seconds become 59
- endOfMillennium() : static
- Resets the date to end of the millennium and time to 23:59:59.999999
- endOfMillisecond() : static
- Modify to end of current millisecond, microseconds such as 12345 become 123999
- endOfMinute() : static
- Modify to end of current minute, seconds become 59
- endOfMonth() : static
- Resets the date to end of the month and time to 23:59:59.999999
- endOfQuarter() : static
- Resets the date to end of the quarter and time to 23:59:59.999999
- endOfSecond() : static
- Modify to end of current second, microseconds become 999999
- endOfWeek() : static
- Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999
- endOfYear() : static
- Resets the date to end of the year and time to 23:59:59.999999
- setDate() : $this
- setTime() : $this
- startOf() : static
- Modify to start of current given unit.
- startOfCentury() : static
- Resets the date to the first day of the century and the time to 00:00:00
- startOfDay() : static
- Resets the time to 00:00:00 start of day
- startOfDecade() : static
- Resets the date to the first day of the decade and the time to 00:00:00
- startOfHour() : static
- Modify to start of current hour, minutes and seconds become 0
- startOfMillennium() : static
- Resets the date to the first day of the millennium and the time to 00:00:00
- startOfMillisecond() : static
- Modify to start of current millisecond, microseconds such as 12345 become 123000
- startOfMinute() : static
- Modify to start of current minute, seconds become 0
- startOfMonth() : static
- Resets the date to the first day of the month and the time to 00:00:00
- startOfQuarter() : static
- Resets the date to the first day of the quarter and the time to 00:00:00
- startOfSecond() : static
- Modify to start of current second, microseconds become 0
- startOfWeek() : static
- Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00
- startOfYear() : static
- Resets the date to the first day of the year and the time to 00:00:00
Properties
$daysInMonth
public
int
$daysInMonth
$month
public
int
$month
$quarter
public
int
$quarter
Depends on the following methods:
$year
public
int
$year
Methods
addMonths()
public
addMonths(int $value = 1) : $this
Parameters
- $value = 1 : int
Return values
$thisendOf()
Modify to end of current given unit.
public
endOf(Unit|string $unit, mixed ...$params) : static
Parameters
- $unit : Unit|string
- $params : mixed
Tags
Return values
staticendOfCentury()
Resets the date to end of the century and time to 23:59:59.999999
public
endOfCentury() : static
Tags
Return values
staticendOfDay()
Resets the time to 23:59:59.999999 end of day
public
endOfDay() : static
Tags
Return values
staticendOfDecade()
Resets the date to end of the decade and time to 23:59:59.999999
public
endOfDecade() : static
Tags
Return values
staticendOfHour()
Modify to end of current hour, minutes and seconds become 59
public
endOfHour() : static
Tags
Return values
staticendOfMillennium()
Resets the date to end of the millennium and time to 23:59:59.999999
public
endOfMillennium() : static
Tags
Return values
staticendOfMillisecond()
Modify to end of current millisecond, microseconds such as 12345 become 123999
public
endOfMillisecond() : static
Tags
Return values
staticendOfMinute()
Modify to end of current minute, seconds become 59
public
endOfMinute() : static
Tags
Return values
staticendOfMonth()
Resets the date to end of the month and time to 23:59:59.999999
public
endOfMonth() : static
Tags
Return values
staticendOfQuarter()
Resets the date to end of the quarter and time to 23:59:59.999999
public
endOfQuarter() : static
Tags
Return values
staticendOfSecond()
Modify to end of current second, microseconds become 999999
public
endOfSecond() : static
Tags
Return values
staticendOfWeek()
Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999
public
endOfWeek([WeekDay|int|null $weekEndsAt = null ]) : static
Parameters
- $weekEndsAt : WeekDay|int|null = null
-
optional end allow you to specify the day of week to use to end the week
Tags
Return values
staticendOfYear()
Resets the date to end of the year and time to 23:59:59.999999
public
endOfYear() : static
Tags
Return values
staticsetDate()
public
setDate(int $year, int $month, int $day) : $this
Parameters
- $year : int
- $month : int
- $day : int
Return values
$thissetTime()
public
setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) : $this
Parameters
- $hour : int
- $minute : int
- $second = 0 : int
- $microseconds = 0 : int
Return values
$thisstartOf()
Modify to start of current given unit.
public
startOf(Unit|string $unit, mixed ...$params) : static
Parameters
- $unit : Unit|string
- $params : mixed
Tags
Return values
staticstartOfCentury()
Resets the date to the first day of the century and the time to 00:00:00
public
startOfCentury() : static
Tags
Return values
staticstartOfDay()
Resets the time to 00:00:00 start of day
public
startOfDay() : static
Tags
Return values
staticstartOfDecade()
Resets the date to the first day of the decade and the time to 00:00:00
public
startOfDecade() : static
Tags
Return values
staticstartOfHour()
Modify to start of current hour, minutes and seconds become 0
public
startOfHour() : static
Tags
Return values
staticstartOfMillennium()
Resets the date to the first day of the millennium and the time to 00:00:00
public
startOfMillennium() : static
Tags
Return values
staticstartOfMillisecond()
Modify to start of current millisecond, microseconds such as 12345 become 123000
public
startOfMillisecond() : static
Tags
Return values
staticstartOfMinute()
Modify to start of current minute, seconds become 0
public
startOfMinute() : static
Tags
Return values
staticstartOfMonth()
Resets the date to the first day of the month and the time to 00:00:00
public
startOfMonth() : static
Tags
Return values
staticstartOfQuarter()
Resets the date to the first day of the quarter and the time to 00:00:00
public
startOfQuarter() : static
Tags
Return values
staticstartOfSecond()
Modify to start of current second, microseconds become 0
public
startOfSecond() : static
Tags
Return values
staticstartOfWeek()
Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00
public
startOfWeek([WeekDay|int|null $weekStartsAt = null ]) : static
Parameters
- $weekStartsAt : WeekDay|int|null = null
-
optional start allow you to specify the day of week to use to start the week
Tags
Return values
staticstartOfYear()
Resets the date to the first day of the year and the time to 00:00:00
public
startOfYear() : static