PHP 인터페이스 Cake\Chronos\ChronosInterface

상속: extends DateTimeInterfac\DateTimeInterface
파일 보기 프로젝트 열기: cakephp/chronos 0 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

addDay() 공개 메소드

Add a day to the instance
public addDay ( integer $value = 1 ) : static
$value integer The number of days to add.
리턴 static

addDays() 공개 메소드

Add days to the instance. Positive $value travels forward while negative $value travels into the past.
public addDays ( integer $value ) : static
$value integer The number of days to add.
리턴 static

addHour() 공개 메소드

Add an hour to the instance
public addHour ( integer $value = 1 ) : static
$value integer The number of hours to add.
리턴 static

addHours() 공개 메소드

Add hours to the instance. Positive $value travels forward while negative $value travels into the past.
public addHours ( integer $value ) : static
$value integer The number of hours to add.
리턴 static

addMinute() 공개 메소드

Add a minute to the instance
public addMinute ( integer $value = 1 ) : static
$value integer The number of minutes to add.
리턴 static

addMinutes() 공개 메소드

Add minutes to the instance. Positive $value travels forward while negative $value travels into the past.
public addMinutes ( integer $value ) : static
$value integer The number of minutes to add.
리턴 static

addMonth() 공개 메소드

When adding or subtracting months, if the resulting time is a date that does not exist, the result of this operation will always be the last day of the intended month. ### Example: (new Chronos('2015-01-03'))->addMonth(); // Results in 2015-02-03 (new Chronos('2015-01-31'))->addMonth(); // Results in 2015-02-28
public addMonth ( integer $value = 1 ) : static
$value integer The number of months to add.
리턴 static

addMonthWithOverflow() 공개 메소드

Add a month with overflow to the instance
public addMonthWithOverflow ( integer $value = 1 ) : static
$value integer The number of months to add.
리턴 static

addMonths() 공개 메소드

When adding or subtracting months, if the resulting time is a date that does not exist, the result of this operation will always be the last day of the intended month. ### Example: (new Chronos('2015-01-03'))->addMonths(1); // Results in 2015-02-03 (new Chronos('2015-01-31'))->addMonths(1); // Results in 2015-02-28
public addMonths ( integer $value ) : static
$value integer The number of months to add.
리턴 static

addMonthsWithOverflow() 공개 메소드

Add months with overflowing to the instance. Positive $value travels forward while negative $value travels into the past.
public addMonthsWithOverflow ( integer $value ) : static
$value integer The number of months to add.
리턴 static

addSecond() 공개 메소드

Add a second to the instance
public addSecond ( integer $value = 1 ) : static
$value integer The number of seconds to add.
리턴 static

addSeconds() 공개 메소드

Add seconds to the instance. Positive $value travels forward while negative $value travels into the past.
public addSeconds ( integer $value ) : static
$value integer The number of seconds to add.
리턴 static

addWeek() 공개 메소드

Add a week to the instance
public addWeek ( integer $value = 1 ) : static
$value integer The number of weeks to add.
리턴 static

addWeekday() 공개 메소드

Add a weekday to the instance
public addWeekday ( integer $value = 1 ) : static
$value integer The number of weekdays to add.
리턴 static

addWeekdays() 공개 메소드

Add weekdays to the instance. Positive $value travels forward while negative $value travels into the past.
public addWeekdays ( integer $value ) : static
$value integer The number of weekdays to add.
리턴 static

addWeeks() 공개 메소드

Add weeks to the instance. Positive $value travels forward while negative $value travels into the past.
public addWeeks ( integer $value ) : static
$value integer The number of weeks to add.
리턴 static

addYear() 공개 메소드

Add a year to the instance
public addYear ( integer $value = 1 ) : static
$value integer The number of years to add.
리턴 static

addYears() 공개 메소드

Add years to the instance. Positive $value travel forward while negative $value travel into the past.
public addYears ( integer $value ) : static
$value integer The number of years to add.
리턴 static

average() 공개 메소드

Modify the current instance to the average of a given instance (default now) and the current instance.
public average ( Cake\Chronos\ChronosInterface $dt = null ) : static
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 static

between() 공개 메소드

Determines if the instance is between two others
public between ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2, boolean $equal = true ) : boolean
$dt1 Cake\Chronos\ChronosInterface The instance to compare with.
$dt2 Cake\Chronos\ChronosInterface The instance to compare with.
$equal boolean Indicates if a > and < comparison should be used or <= or >=
리턴 boolean

closest() 공개 메소드

Get the closest date from the instance.
public closest ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2 ) : static
$dt1 Cake\Chronos\ChronosInterface The instance to compare with.
$dt2 Cake\Chronos\ChronosInterface The instance to compare with.
리턴 static

copy() 공개 메소드

Get a copy of the instance
public copy ( ) : static
리턴 static

day() 공개 메소드

Set the instance's day
public day ( integer $value ) : static
$value integer The day value.
리턴 static

diffFiltered() 공개 메소드

Get the difference by the given interval using a filter callable
public diffFiltered ( ChronosInterval $ci, callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$ci ChronosInterval An interval to traverse by
$callback callable The callback to use for filtering.
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffForHumans() 공개 메소드

When comparing a value in the past to default now: 1 hour ago 5 months ago When comparing a value in the future to default now: 1 hour from now 5 months from now When comparing a value in the past to another value: 1 hour before 5 months before When comparing a value in the future to another value: 1 hour after 5 months after
public diffForHumans ( Cake\Chronos\ChronosInterface $other = null, boolean $absolute = false ) : string
$other Cake\Chronos\ChronosInterface The datetime to compare with.
$absolute boolean Removes time difference modifiers ago, after, etc
리턴 string

diffInDays() 공개 메소드

Get the difference in days
public diffInDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInDaysFiltered() 공개 메소드

Get the difference in days using a filter callable
public diffInDaysFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$callback callable The callback to use for filtering.
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInHours() 공개 메소드

Get the difference in hours
public diffInHours ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInHoursFiltered() 공개 메소드

Get the difference in hours using a filter callable
public diffInHoursFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$callback callable The callback to use for filtering.
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInMinutes() 공개 메소드

Get the difference in minutes
public diffInMinutes ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInMonths() 공개 메소드

Get the difference in months
public diffInMonths ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInSeconds() 공개 메소드

Get the difference in seconds
public diffInSeconds ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInWeekdays() 공개 메소드

Get the difference in weekdays
public diffInWeekdays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInWeekendDays() 공개 메소드

Get the difference in weekend days using a filter
public diffInWeekendDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInWeeks() 공개 메소드

Get the difference in weeks
public diffInWeeks ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

diffInYears() 공개 메소드

Get the difference in years
public diffInYears ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
리턴 integer

endOfCentury() 공개 메소드

Resets the date to end of the century and time to 23:59:59
public endOfCentury ( ) : static
리턴 static

endOfDay() 공개 메소드

Resets the time to 23:59:59
public endOfDay ( ) : static
리턴 static

endOfDecade() 공개 메소드

Resets the date to end of the decade and time to 23:59:59
public endOfDecade ( ) : static
리턴 static

endOfMonth() 공개 메소드

Resets the date to end of the month and time to 23:59:59
public endOfMonth ( ) : static
리턴 static

endOfWeek() 공개 메소드

Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59
public endOfWeek ( ) : static
리턴 static

endOfYear() 공개 메소드

Resets the date to end of the year and time to 23:59:59
public endOfYear ( ) : static
리턴 static

eq() 공개 메소드

Determines if the instance is equal to another
public eq ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

farthest() 공개 메소드

Get the farthest date from the instance.
public farthest ( Cake\Chronos\ChronosInterface $dt1, Cake\Chronos\ChronosInterface $dt2 ) : static
$dt1 Cake\Chronos\ChronosInterface The instance to compare with.
$dt2 Cake\Chronos\ChronosInterface The instance to compare with.
리턴 static

firstOfMonth() 공개 메소드

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.
public firstOfMonth ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

firstOfQuarter() 공개 메소드

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.
public firstOfQuarter ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

firstOfYear() 공개 메소드

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.
public firstOfYear ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

gt() 공개 메소드

Determines if the instance is greater (after) than another
public gt ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

gte() 공개 메소드

Determines if the instance is greater (after) than or equal to another
public gte ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

hour() 공개 메소드

Set the instance's hour
public hour ( integer $value ) : static
$value integer The hour value.
리턴 static

isBirthday() 공개 메소드

Check if its the birthday. Compares the date/month values of the two dates.
public isBirthday ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

isFriday() 공개 메소드

Checks if this day is a Friday.
public isFriday ( ) : boolean
리턴 boolean

isFuture() 공개 메소드

Determines if the instance is in the future, ie. greater (after) than now
public isFuture ( ) : boolean
리턴 boolean

isLeapYear() 공개 메소드

Determines if the instance is a leap year
public isLeapYear ( ) : boolean
리턴 boolean

isMonday() 공개 메소드

Checks if this day is a Monday.
public isMonday ( ) : boolean
리턴 boolean

isMutable() 공개 메소드

Check if instance of ChronosInterface is mutable.
public isMutable ( ) : boolean
리턴 boolean

isPast() 공개 메소드

Determines if the instance is in the past, ie. less (before) than now
public isPast ( ) : boolean
리턴 boolean

isSameDay() 공개 메소드

Checks if the passed in date is the same day as the instance current day.
public isSameDay ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to check against.
리턴 boolean

isSaturday() 공개 메소드

Checks if this day is a Saturday.
public isSaturday ( ) : boolean
리턴 boolean

isSunday() 공개 메소드

Checks if this day is a Sunday.
public isSunday ( ) : boolean
리턴 boolean

isThisMonth() 공개 메소드

Returns true if this object represents a date within the current month
public isThisMonth ( ) : boolean
리턴 boolean

isThisWeek() 공개 메소드

Returns true if this object represents a date within the current week
public isThisWeek ( ) : boolean
리턴 boolean

isThisYear() 공개 메소드

Returns true if this object represents a date within the current year
public isThisYear ( ) : boolean
리턴 boolean

isThursday() 공개 메소드

Checks if this day is a Thursday.
public isThursday ( ) : boolean
리턴 boolean

isToday() 공개 메소드

Determines if the instance is today
public isToday ( ) : boolean
리턴 boolean

isTomorrow() 공개 메소드

Determines if the instance is tomorrow
public isTomorrow ( ) : boolean
리턴 boolean

isTuesday() 공개 메소드

Checks if this day is a Tuesday.
public isTuesday ( ) : boolean
리턴 boolean

isWednesday() 공개 메소드

Checks if this day is a Wednesday.
public isWednesday ( ) : boolean
리턴 boolean

isWeekday() 공개 메소드

Determines if the instance is a weekday
public isWeekday ( ) : boolean
리턴 boolean

isWeekend() 공개 메소드

Determines if the instance is a weekend day
public isWeekend ( ) : boolean
리턴 boolean

isWithinNext() 공개 메소드

Returns true this instance will happen within the specified interval
public isWithinNext ( string | integer $timeInterval ) : boolean
$timeInterval string | integer the numeric value with space then time type. Example of valid types: 6 hours, 2 days, 1 minute.
리턴 boolean

isYesterday() 공개 메소드

Determines if the instance is yesterday
public isYesterday ( ) : boolean
리턴 boolean

lastOfMonth() 공개 메소드

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.
public lastOfMonth ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

lastOfQuarter() 공개 메소드

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.
public lastOfQuarter ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

lastOfYear() 공개 메소드

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.
public lastOfYear ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

lt() 공개 메소드

Determines if the instance is less (before) than another
public lt ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

lte() 공개 메소드

Determines if the instance is less (before) or equal to another
public lte ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

max() 공개 메소드

Get the maximum instance between a given instance (default now) and the current instance.
public max ( Cake\Chronos\ChronosInterface $dt = null ) : static
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 static

min() 공개 메소드

Get the minimum instance between a given instance (default now) and the current instance.
public min ( Cake\Chronos\ChronosInterface $dt = null ) : static
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 static

minute() 공개 메소드

Set the instance's minute
public minute ( integer $value ) : static
$value integer The minute value.
리턴 static

month() 공개 메소드

Set the instance's month
public month ( integer $value ) : static
$value integer The month value.
리턴 static

ne() 공개 메소드

Determines if the instance is not equal to another
public ne ( Cake\Chronos\ChronosInterface $dt ) : boolean
$dt Cake\Chronos\ChronosInterface The instance to compare with.
리턴 boolean

next() 공개 메소드

If no dayOfWeek is provided, modify to the next occurrence of the current day of the week. Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY.
public next ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

nthOfMonth() 공개 메소드

Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY.
public nthOfMonth ( integer $nth, integer $dayOfWeek ) : mixed
$nth integer The offset to use.
$dayOfWeek integer The day of the week to move to.
리턴 mixed

nthOfQuarter() 공개 메소드

Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY.
public nthOfQuarter ( integer $nth, integer $dayOfWeek ) : mixed
$nth integer The offset to use.
$dayOfWeek integer The day of the week to move to.
리턴 mixed

nthOfYear() 공개 메소드

Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY.
public nthOfYear ( integer $nth, integer $dayOfWeek ) : mixed
$nth integer The offset to use.
$dayOfWeek integer The day of the week to move to.
리턴 mixed

previous() 공개 메소드

If no dayOfWeek is provided, modify to the previous occurrence of the current day of the week. Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY.
public previous ( integer $dayOfWeek = null ) : mixed
$dayOfWeek integer The day of the week to move to.
리턴 mixed

second() 공개 메소드

Set the instance's second
public second ( integer $value ) : static
$value integer The seconds value.
리턴 static

secondsSinceMidnight() 공개 메소드

The number of seconds since midnight.
public secondsSinceMidnight ( ) : integer
리턴 integer

secondsUntilEndOfDay() 공개 메소드

The number of seconds until 23:23:59.
public secondsUntilEndOfDay ( ) : integer
리턴 integer

setDateTime() 공개 메소드

Set the date and time all together
public setDateTime ( integer $year, integer $month, integer $day, integer $hour, integer $minute, integer $second ) : static
$year integer The year to set.
$month integer The month to set.
$day integer The day to set.
$hour integer The hour to set.
$minute integer The minute to set.
$second integer The second to set.
리턴 static

setTimeFromTimeString() 공개 메소드

Set the time by time string
public setTimeFromTimeString ( string $time ) : static
$time string Time as string.
리턴 static

setTimezone() 공개 메소드

Set the instance's timezone from a string or object
public setTimezone ( DateTimeZon\DateTimeZone | string $value ) : static
$value DateTimeZon\DateTimeZone | string The DateTimeZone object or timezone name to use.
리턴 static

startOfCentury() 공개 메소드

Resets the date to the first day of the century and the time to 00:00:00
public startOfCentury ( ) : static
리턴 static

startOfDay() 공개 메소드

Resets the time to 00:00:00
public startOfDay ( ) : static
리턴 static

startOfDecade() 공개 메소드

Resets the date to the first day of the decade and the time to 00:00:00
public startOfDecade ( ) : static
리턴 static

startOfMonth() 공개 메소드

Resets the date to the first day of the month and the time to 00:00:00
public startOfMonth ( ) : static
리턴 static

startOfWeek() 공개 메소드

Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00
public startOfWeek ( ) : static
리턴 static

startOfYear() 공개 메소드

Resets the date to the first day of the year and the time to 00:00:00
public startOfYear ( ) : static
리턴 static

subDay() 공개 메소드

Remove a day from the instance
public subDay ( integer $value = 1 ) : static
$value integer The number of days to remove.
리턴 static

subDays() 공개 메소드

Remove days from the instance
public subDays ( integer $value ) : static
$value integer The number of days to remove.
리턴 static

subHour() 공개 메소드

Remove an hour from the instance
public subHour ( integer $value = 1 ) : static
$value integer The number of hours to remove.
리턴 static

subHours() 공개 메소드

Remove hours from the instance
public subHours ( integer $value ) : static
$value integer The number of hours to remove.
리턴 static

subMinute() 공개 메소드

Remove a minute from the instance
public subMinute ( integer $value = 1 ) : static
$value integer The number of minutes to remove.
리턴 static

subMinutes() 공개 메소드

Remove minutes from the instance
public subMinutes ( integer $value ) : static
$value integer The number of minutes to remove.
리턴 static

subMonth() 공개 메소드

When adding or subtracting months, if the resulting time is a date that does not exist, the result of this operation will always be the last day of the intended month. ### Example: (new Chronos('2015-03-01'))->subMonth(); // Results in 2015-02-01 (new Chronos('2015-03-31'))->subMonth(); // Results in 2015-02-28
public subMonth ( integer $value = 1 ) : static
$value integer The number of months to remove.
리턴 static

subMonthWithOverflow() 공개 메소드

Remove a month with overflow from the instance
public subMonthWithOverflow ( integer $value = 1 ) : static
$value integer The number of months to remove.
리턴 static

subMonths() 공개 메소드

When adding or subtracting months, if the resulting time is a date that does not exist, the result of this operation will always be the last day of the intended month. ### Example: (new Chronos('2015-03-01'))->subMonths(1); // Results in 2015-02-01 (new Chronos('2015-03-31'))->subMonths(1); // Results in 2015-02-28
public subMonths ( integer $value ) : static
$value integer The number of months to remove.
리턴 static

subMonthsWithOverflow() 공개 메소드

Remove months with overflow from the instance
public subMonthsWithOverflow ( integer $value ) : static
$value integer The number of months to remove.
리턴 static

subSecond() 공개 메소드

Remove a second from the instance
public subSecond ( integer $value = 1 ) : static
$value integer The number of seconds to remove.
리턴 static

subSeconds() 공개 메소드

Remove seconds from the instance
public subSeconds ( integer $value ) : static
$value integer The number of seconds to remove.
리턴 static

subWeek() 공개 메소드

Remove a week from the instance
public subWeek ( integer $value = 1 ) : static
$value integer The number of weeks to remove.
리턴 static

subWeekday() 공개 메소드

Remove a weekday from the instance
public subWeekday ( integer $value = 1 ) : static
$value integer The number of weekdays to remove.
리턴 static

subWeekdays() 공개 메소드

Remove weekdays from the instance
public subWeekdays ( integer $value ) : static
$value integer The number of weekdays to remove.
리턴 static

subWeeks() 공개 메소드

Remove weeks to the instance
public subWeeks ( integer $value ) : static
$value integer The number of weeks to remove.
리턴 static

subYear() 공개 메소드

Remove a year from the instance
public subYear ( integer $value = 1 ) : static
$value integer The number of years to remove.
리턴 static

subYears() 공개 메소드

Remove years from the instance.
public subYears ( integer $value ) : static
$value integer The number of years to remove.
리턴 static

timestamp() 공개 메소드

Set the instance's timestamp
public timestamp ( integer $value ) : static
$value integer The timestamp value to set.
리턴 static

timezone() 공개 메소드

Alias for setTimezone()
public timezone ( DateTimeZon\DateTimeZone | string $value ) : static
$value DateTimeZon\DateTimeZone | string The DateTimeZone object or timezone name to use.
리턴 static

toAtomString() 공개 메소드

Format the instance as ATOM
public toAtomString ( ) : string
리턴 string

toCookieString() 공개 메소드

Format the instance as COOKIE
public toCookieString ( ) : string
리턴 string

toDateString() 공개 메소드

Format the instance as date
public toDateString ( ) : string
리턴 string

toDateTimeString() 공개 메소드

Format the instance as date and time
public toDateTimeString ( ) : string
리턴 string

toDayDateTimeString() 공개 메소드

Format the instance with day, date and time
public toDayDateTimeString ( ) : string
리턴 string

toFormattedDateString() 공개 메소드

Format the instance as a readable date
public toFormattedDateString ( ) : string
리턴 string

toIso8601String() 공개 메소드

Format the instance as ISO8601
public toIso8601String ( ) : string
리턴 string

toRfc1036String() 공개 메소드

Format the instance as RFC1036
public toRfc1036String ( ) : string
리턴 string

toRfc1123String() 공개 메소드

Format the instance as RFC1123
public toRfc1123String ( ) : string
리턴 string

toRfc2822String() 공개 메소드

Format the instance as RFC2822
public toRfc2822String ( ) : string
리턴 string

toRfc3339String() 공개 메소드

Format the instance as RFC3339
public toRfc3339String ( ) : string
리턴 string

toRfc822String() 공개 메소드

Format the instance as RFC822
public toRfc822String ( ) : string
리턴 string

toRfc850String() 공개 메소드

Format the instance as RFC850
public toRfc850String ( ) : string
리턴 string

toRssString() 공개 메소드

Format the instance as RSS
public toRssString ( ) : string
리턴 string

toTimeString() 공개 메소드

Format the instance as time
public toTimeString ( ) : string
리턴 string

toW3cString() 공개 메소드

Format the instance as W3C
public toW3cString ( ) : string
리턴 string

tz() 공개 메소드

Alias for setTimezone()
public tz ( DateTimeZon\DateTimeZone | string $value ) : static
$value DateTimeZon\DateTimeZone | string The DateTimeZone object or timezone name to use.
리턴 static

wasWithinLast() 공개 메소드

Returns true this instance happened within the specified interval
public wasWithinLast ( string | integer $timeInterval ) : boolean
$timeInterval string | integer the numeric value with space then time type. Example of valid types: 6 hours, 2 days, 1 minute.
리턴 boolean

year() 공개 메소드

Set the instance's year
public year ( integer $value ) : static
$value integer The year value.
리턴 static