Méthode |
Description |
|
addDay ( integer $value = 1 ) : static |
Add a day to the instance |
|
addDays ( integer $value ) : static |
Add days to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addHour ( integer $value = 1 ) : static |
Add an hour to the instance |
|
addHours ( integer $value ) : static |
Add hours to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addMinute ( integer $value = 1 ) : static |
Add a minute to the instance |
|
addMinutes ( integer $value ) : static |
Add minutes to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addMonth ( integer $value = 1 ) : static |
Add a month to the instance |
|
addMonthWithOverflow ( integer $value = 1 ) : static |
Add a month with overflow to the instance |
|
addMonths ( integer $value ) : static |
Add months to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addMonthsWithOverflow ( integer $value ) : static |
Add months with overflowing to the instance. Positive $value
travels forward while negative $value travels into the past. |
|
addSecond ( integer $value = 1 ) : static |
Add a second to the instance |
|
addSeconds ( integer $value ) : static |
Add seconds to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addWeek ( integer $value = 1 ) : static |
Add a week to the instance |
|
addWeekday ( integer $value = 1 ) : static |
Add a weekday to the instance |
|
addWeekdays ( integer $value ) : static |
Add weekdays to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addWeeks ( integer $value ) : static |
Add weeks to the instance. Positive $value travels forward while
negative $value travels into the past. |
|
addYear ( integer $value = 1 ) : static |
Add a year to the instance |
|
addYears ( integer $value ) : static |
Add years to the instance. Positive $value travel forward while
negative $value travel into the past. |
|
average ( Cake\Chronos\ChronosInterface $dt = null ) : static |
Modify the current instance to the average of a given instance (default now) and the current instance. |
|
between ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2, boolean $equal = true ) : boolean |
Determines if the instance is between two others |
|
closest ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2 ) : static |
Get the closest date from the instance. |
|
copy ( ) : static |
Get a copy of the instance |
|
day ( integer $value ) : static |
Set the instance's day |
|
diffFiltered ( ChronosInterval $ci, callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference by the given interval using a filter callable |
|
diffForHumans ( Cake\Chronos\ChronosInterface $other = null, boolean $absolute = false ) : string |
Get the difference in a human readable format in the current locale. |
|
diffInDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in days |
|
diffInDaysFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in days using a filter callable |
|
diffInHours ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in hours |
|
diffInHoursFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in hours using a filter callable |
|
diffInMinutes ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in minutes |
|
diffInMonths ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in months |
|
diffInSeconds ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in seconds |
|
diffInWeekdays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in weekdays |
|
diffInWeekendDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in weekend days using a filter |
|
diffInWeeks ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in weeks |
|
diffInYears ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer |
Get the difference in years |
|
endOfCentury ( ) : static |
Resets the date to end of the century and time to 23:59:59 |
|
endOfDay ( ) : static |
Resets the time to 23:59:59 |
|
endOfDecade ( ) : static |
Resets the date to end of the decade and time to 23:59:59 |
|
endOfMonth ( ) : static |
Resets the date to end of the month and time to 23:59:59 |
|
endOfWeek ( ) : static |
Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59 |
|
endOfYear ( ) : static |
Resets the date to end of the year and time to 23:59:59 |
|
eq ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is equal to another |
|
farthest ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2 ) : static |
Get the farthest date from the instance. |
|
firstOfMonth ( integer $dayOfWeek = null ) : mixed |
Modify to the first occurrence of a given day of the week
in the current month. If no dayOfWeek is provided, modify to the
first day of the current month. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
firstOfQuarter ( integer $dayOfWeek = null ) : mixed |
Modify to the first occurrence of a given day of the week
in the current quarter. If no dayOfWeek is provided, modify to the
first day of the current quarter. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
firstOfYear ( integer $dayOfWeek = null ) : mixed |
Modify to the first occurrence of a given day of the week
in the current year. If no dayOfWeek is provided, modify to the
first day of the current year. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
gt ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is greater (after) than another |
|
gte ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is greater (after) than or equal to another |
|
hour ( integer $value ) : static |
Set the instance's hour |
|
isBirthday ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Check if its the birthday. Compares the date/month values of the two dates. |
|
isFriday ( ) : boolean |
Checks if this day is a Friday. |
|
isFuture ( ) : boolean |
Determines if the instance is in the future, ie. greater (after) than now |
|
isLeapYear ( ) : boolean |
Determines if the instance is a leap year |
|
isMonday ( ) : boolean |
Checks if this day is a Monday. |
|
isMutable ( ) : boolean |
Check if instance of ChronosInterface is mutable. |
|
isPast ( ) : boolean |
Determines if the instance is in the past, ie. less (before) than now |
|
isSameDay ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Checks if the passed in date is the same day as the instance current day. |
|
isSaturday ( ) : boolean |
Checks if this day is a Saturday. |
|
isSunday ( ) : boolean |
Checks if this day is a Sunday. |
|
isThisMonth ( ) : boolean |
Returns true if this object represents a date within the current month |
|
isThisWeek ( ) : boolean |
Returns true if this object represents a date within the current week |
|
isThisYear ( ) : boolean |
Returns true if this object represents a date within the current year |
|
isThursday ( ) : boolean |
Checks if this day is a Thursday. |
|
isToday ( ) : boolean |
Determines if the instance is today |
|
isTomorrow ( ) : boolean |
Determines if the instance is tomorrow |
|
isTuesday ( ) : boolean |
Checks if this day is a Tuesday. |
|
isWednesday ( ) : boolean |
Checks if this day is a Wednesday. |
|
isWeekday ( ) : boolean |
Determines if the instance is a weekday |
|
isWeekend ( ) : boolean |
Determines if the instance is a weekend day |
|
isWithinNext ( string | integer $timeInterval ) : boolean |
Returns true this instance will happen within the specified interval |
|
isYesterday ( ) : boolean |
Determines if the instance is yesterday |
|
lastOfMonth ( integer $dayOfWeek = null ) : mixed |
Modify to the last occurrence of a given day of the week
in the current month. If no dayOfWeek is provided, modify to the
last day of the current month. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
lastOfQuarter ( integer $dayOfWeek = null ) : mixed |
Modify to the last occurrence of a given day of the week
in the current quarter. If no dayOfWeek is provided, modify to the
last day of the current quarter. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
lastOfYear ( integer $dayOfWeek = null ) : mixed |
Modify to the last occurrence of a given day of the week
in the current year. If no dayOfWeek is provided, modify to the
last day of the current year. Use the supplied consts
to indicate the desired dayOfWeek, ex. static::MONDAY. |
|
lt ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is less (before) than another |
|
lte ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is less (before) or equal to another |
|
max ( Cake\Chronos\ChronosInterface $dt = null ) : static |
Get the maximum instance between a given instance (default now) and the current instance. |
|
min ( Cake\Chronos\ChronosInterface $dt = null ) : static |
Get the minimum instance between a given instance (default now) and the current instance. |
|
minute ( integer $value ) : static |
Set the instance's minute |
|
month ( integer $value ) : static |
Set the instance's month |
|
ne ( Cake\Chronos\ChronosInterface $dt ) : boolean |
Determines if the instance is not equal to another |
|
next ( integer $dayOfWeek = null ) : mixed |
Modify to the next occurrence of a given day of the week. |
|
nthOfMonth ( integer $nth, integer $dayOfWeek ) : mixed |
Modify to the given occurrence of a given day of the week
in the current month. If the calculated occurrence is outside the scope
of the current month, then return false and no modifications are made. |
|
nthOfQuarter ( integer $nth, integer $dayOfWeek ) : mixed |
Modify to the given occurrence of a given day of the week
in the current quarter. If the calculated occurrence is outside the scope
of the current quarter, then return false and no modifications are made. |
|
nthOfYear ( integer $nth, integer $dayOfWeek ) : mixed |
Modify to the given occurrence of a given day of the week
in the current year. If the calculated occurrence is outside the scope
of the current year, then return false and no modifications are made. |
|
previous ( integer $dayOfWeek = null ) : mixed |
Modify to the previous occurrence of a given day of the week. |
|
second ( integer $value ) : static |
Set the instance's second |
|
secondsSinceMidnight ( ) : integer |
The number of seconds since midnight. |
|
secondsUntilEndOfDay ( ) : integer |
The number of seconds until 23:23:59. |
|
setDateTime ( integer $year, integer $month, integer $day, integer $hour, integer $minute, integer $second ) : static |
Set the date and time all together |
|
setTimeFromTimeString ( string $time ) : static |
Set the time by time string |
|
setTimezone ( DateTimeZon\DateTimeZone | string $value ) : static |
Set the instance's timezone from a string or object |
|
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 |
|
startOfDecade ( ) : static |
Resets the date to the first day of the decade and the time to 00:00:00 |
|
startOfMonth ( ) : static |
Resets the date to the first day of the month and the time to 00:00:00 |
|
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 |
|
subDay ( integer $value = 1 ) : static |
Remove a day from the instance |
|
subDays ( integer $value ) : static |
Remove days from the instance |
|
subHour ( integer $value = 1 ) : static |
Remove an hour from the instance |
|
subHours ( integer $value ) : static |
Remove hours from the instance |
|
subMinute ( integer $value = 1 ) : static |
Remove a minute from the instance |
|
subMinutes ( integer $value ) : static |
Remove minutes from the instance |
|
subMonth ( integer $value = 1 ) : static |
Remove a month from the instance |
|
subMonthWithOverflow ( integer $value = 1 ) : static |
Remove a month with overflow from the instance |
|
subMonths ( integer $value ) : static |
Remove months from the instance |
|
subMonthsWithOverflow ( integer $value ) : static |
Remove months with overflow from the instance |
|
subSecond ( integer $value = 1 ) : static |
Remove a second from the instance |
|
subSeconds ( integer $value ) : static |
Remove seconds from the instance |
|
subWeek ( integer $value = 1 ) : static |
Remove a week from the instance |
|
subWeekday ( integer $value = 1 ) : static |
Remove a weekday from the instance |
|
subWeekdays ( integer $value ) : static |
Remove weekdays from the instance |
|
subWeeks ( integer $value ) : static |
Remove weeks to the instance |
|
subYear ( integer $value = 1 ) : static |
Remove a year from the instance |
|
subYears ( integer $value ) : static |
Remove years from the instance. |
|
timestamp ( integer $value ) : static |
Set the instance's timestamp |
|
timezone ( DateTimeZon\DateTimeZone | string $value ) : static |
Alias for setTimezone() |
|
toAtomString ( ) : string |
Format the instance as ATOM |
|
toCookieString ( ) : string |
Format the instance as COOKIE |
|
toDateString ( ) : string |
Format the instance as date |
|
toDateTimeString ( ) : string |
Format the instance as date and time |
|
toDayDateTimeString ( ) : string |
Format the instance with day, date and time |
|
toFormattedDateString ( ) : string |
Format the instance as a readable date |
|
toIso8601String ( ) : string |
Format the instance as ISO8601 |
|
toRfc1036String ( ) : string |
Format the instance as RFC1036 |
|
toRfc1123String ( ) : string |
Format the instance as RFC1123 |
|
toRfc2822String ( ) : string |
Format the instance as RFC2822 |
|
toRfc3339String ( ) : string |
Format the instance as RFC3339 |
|
toRfc822String ( ) : string |
Format the instance as RFC822 |
|
toRfc850String ( ) : string |
Format the instance as RFC850 |
|
toRssString ( ) : string |
Format the instance as RSS |
|
toTimeString ( ) : string |
Format the instance as time |
|
toW3cString ( ) : string |
Format the instance as W3C |
|
tz ( DateTimeZon\DateTimeZone | string $value ) : static |
Alias for setTimezone() |
|
wasWithinLast ( string | integer $timeInterval ) : boolean |
Returns true this instance happened within the specified interval |
|
year ( integer $value ) : static |
Set the instance's year |
|