\CronDayOfWeekField

Day of week field. Allows: * / , - ? L #

Days of the week can be represented as a number 0-7 (0|7 = Sunday) or as a three letter string: SUN, MON, TUE, WED, THU, FRI, SAT.

'L' stands for "last". It allows you to specify constructs such as "the last Friday" of a given month.

'#' is allowed for the day-of-week field, and must be followed by a number between one and five. It allows you to specify constructs such as "the second Friday" of a given month.

Summary

Methods
Properties
Constants
__construct()
isSatisfied()
isRange()
isIncrementsOfRanges()
isInRange()
isInIncrementsOfRanges()
getRangeForExpression()
validate()
isSatisfiedBy()
increment()
No public properties found
No constants found
convertLiterals()
$fullRange
$literals
$rangeStart
$rangeEnd
$nthRange
N/A
No private methods found
No private properties found
N/A

Properties

$fullRange

$fullRange : array

Full range of values that are allowed for this field type

Type

array

$literals

$literals : array

Literal values we need to convert to integers

Type

array

$rangeStart

$rangeStart : integer

Start value of the full range

Type

integer

$rangeEnd

$rangeEnd : integer

End value of the full range

Type

integer

$nthRange

$nthRange : 

Type

Methods

__construct()

__construct() 

isSatisfied()

isSatisfied(string  $dateValue, string  $value) : boolean

Check to see if a field is satisfied by a value

Parameters

string $dateValue

Date value to check

string $value

Value to test

Returns

boolean

isRange()

isRange(string  $value) : boolean

Check if a value is a range

Parameters

string $value

Value to test

Returns

boolean

isIncrementsOfRanges()

isIncrementsOfRanges(string  $value) : boolean

Check if a value is an increments of ranges

Parameters

string $value

Value to test

Returns

boolean

isInRange()

isInRange(string  $dateValue, string  $value) : boolean

Test if a value is within a range

Parameters

string $dateValue

Set date value

string $value

Value to test

Returns

boolean

isInIncrementsOfRanges()

isInIncrementsOfRanges(string  $dateValue, string  $value) : boolean

Test if a value is within an increments of ranges (offset[-to]/step size)

Parameters

string $dateValue

Set date value

string $value

Value to test

Returns

boolean

getRangeForExpression()

getRangeForExpression(string  $expression, integer  $max) : array

Returns a range of values for the given cron expression

Parameters

string $expression

The expression to evaluate

integer $max

Maximum offset for range

Returns

array

validate()

validate(string  $value) : boolean

Checks to see if a value is valid for the field

Parameters

string $value

CRON expression value to validate

Returns

boolean

isSatisfiedBy()

isSatisfiedBy(\DateTime  $date,   $value) 

Parameters

\DateTime $date
$value

increment()

increment(\DateTime  $date,   $invert = false) 

Parameters

\DateTime $date
$invert

convertLiterals()

convertLiterals(  $value) 

Parameters

$value