Properties

$weekendDays

$weekendDays : array

Days of weekend

Type

array

Methods

getWeekendDays()

getWeekendDays() : array

Get weekend days

Returns

array

setWeekendDays()

setWeekendDays(array  $days) : void

Set weekend days

Parameters

array $days

Which days are 'weekends'.

eq()

eq(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is equal to another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

ne()

ne(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is not equal to another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

gt()

gt(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is greater (after) than another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

gte()

gte(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is greater (after) than or equal to another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

lt()

lt(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is less (before) than another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

lte()

lte(\Cake\Chronos\ChronosInterface  $dt) : boolean

Determines if the instance is less (before) or equal to another

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to compare with.

Returns

boolean

between()

between(\Cake\Chronos\ChronosInterface  $dt1, \Cake\Chronos\ChronosInterface  $dt2, boolean  $equal = true) : boolean

Determines if the instance is between two others

Parameters

\Cake\Chronos\ChronosInterface $dt1

The instance to compare with.

\Cake\Chronos\ChronosInterface $dt2

The instance to compare with.

boolean $equal

Indicates if a > and < comparison should be used or <= or >=

Returns

boolean

min()

min(\Cake\Chronos\ChronosInterface|null  $dt = null) : static

Get the minimum instance between a given instance (default now) and the current instance.

Parameters

\Cake\Chronos\ChronosInterface|null $dt

The instance to compare with.

Returns

static

max()

max(\Cake\Chronos\ChronosInterface|null  $dt = null) : static

Get the maximum instance between a given instance (default now) and the current instance.

Parameters

\Cake\Chronos\ChronosInterface|null $dt

The instance to compare with.

Returns

static

isWeekday()

isWeekday() : boolean

Determines if the instance is a weekday

Returns

boolean

isWeekend()

isWeekend() : boolean

Determines if the instance is a weekend day

Returns

boolean

isYesterday()

isYesterday() : boolean

Determines if the instance is yesterday

Returns

boolean

isToday()

isToday() : boolean

Determines if the instance is today

Returns

boolean

isTomorrow()

isTomorrow() : boolean

Determines if the instance is tomorrow

Returns

boolean

isNextWeek()

isNextWeek() : boolean

Determines if the instance is within the next week

Returns

boolean

isLastWeek()

isLastWeek() : boolean

Determines if the instance is within the last week

Returns

boolean

isNextMonth()

isNextMonth() : boolean

Determines if the instance is within the next month

Returns

boolean

isLastMonth()

isLastMonth() : boolean

Determines if the instance is within the last month

Returns

boolean

isNextYear()

isNextYear() : boolean

Determines if the instance is within the next year

Returns

boolean

isLastYear()

isLastYear() : boolean

Determines if the instance is within the last year

Returns

boolean

isFuture()

isFuture() : boolean

Determines if the instance is in the future, ie. greater (after) than now

Returns

boolean

isPast()

isPast() : boolean

Determines if the instance is in the past, ie. less (before) than now

Returns

boolean

isLeapYear()

isLeapYear() : boolean

Determines if the instance is a leap year

Returns

boolean

isSameDay()

isSameDay(\Cake\Chronos\ChronosInterface  $dt) : boolean

Checks if the passed in date is the same day as the instance current day.

Parameters

\Cake\Chronos\ChronosInterface $dt

The instance to check against.

Returns

boolean

isSunday()

isSunday() : boolean

Checks if this day is a Sunday.

Returns

boolean

isMonday()

isMonday() : boolean

Checks if this day is a Monday.

Returns

boolean

isTuesday()

isTuesday() : boolean

Checks if this day is a Tuesday.

Returns

boolean

isWednesday()

isWednesday() : boolean

Checks if this day is a Wednesday.

Returns

boolean

isThursday()

isThursday() : boolean

Checks if this day is a Thursday.

Returns

boolean

isFriday()

isFriday() : boolean

Checks if this day is a Friday.

Returns

boolean

isSaturday()

isSaturday() : boolean

Checks if this day is a Saturday.

Returns

boolean

isThisWeek()

isThisWeek() : boolean

Returns true if this object represents a date within the current week

Returns

boolean

isThisMonth()

isThisMonth() : boolean

Returns true if this object represents a date within the current month

Returns

boolean

isThisYear()

isThisYear() : boolean

Returns true if this object represents a date within the current year

Returns

boolean

isBirthday()

isBirthday(\Cake\Chronos\ChronosInterface|null  $dt = null) : static

Check if its the birthday. Compares the date/month values of the two dates.

Parameters

\Cake\Chronos\ChronosInterface|null $dt

The instance to compare with or null to use current day.

Returns

static

wasWithinLast()

wasWithinLast(string|integer  $timeInterval) : boolean

Returns true this instance happened within the specified interval

Parameters

string|integer $timeInterval

the numeric value with space then time type. Example of valid types: 6 hours, 2 days, 1 minute.

Returns

boolean

isWithinNext()

isWithinNext(string|integer  $timeInterval) : boolean

Returns true this instance will happen within the specified interval

Parameters

string|integer $timeInterval

the numeric value with space then time type. Example of valid types: 6 hours, 2 days, 1 minute.

Returns

boolean

isMutable()

isMutable() : boolean

Check if instance of ChronosInterface is mutable.

Returns

boolean