DayOfWeekField
extends AbstractField
in package
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.
Table of Contents
- getRangeForExpression() : array<string|int, mixed>
- Returns a range of values for the given cron expression
- increment() : mixed
- isIncrementsOfRanges() : bool
- Check if a value is an increments of ranges
- isInIncrementsOfRanges() : bool
- Test if a value is within an increments of ranges (offset[-to]/step size)
- isInRange() : bool
- Test if a value is within a range
- isRange() : bool
- Check if a value is a range
- isSatisfied() : bool
- Check to see if a field is satisfied by a value
- isSatisfiedBy() : mixed
- validate() : mixed
- convertLiterals() : mixed
Methods
getRangeForExpression()
Returns a range of values for the given cron expression
public
getRangeForExpression(string $expression, int $max) : array<string|int, mixed>
Parameters
- $expression : string
-
The expression to evaluate
- $max : int
-
Maximum offset for range
Return values
array<string|int, mixed> —increment()
public
increment(DateTime $date[, mixed $invert = false ]) : mixed
Parameters
- $date : DateTime
- $invert : mixed = false
Return values
mixed —isIncrementsOfRanges()
Check if a value is an increments of ranges
public
isIncrementsOfRanges(string $value) : bool
Parameters
- $value : string
-
Value to test
Return values
bool —isInIncrementsOfRanges()
Test if a value is within an increments of ranges (offset[-to]/step size)
public
isInIncrementsOfRanges(string $dateValue, string $value) : bool
Parameters
- $dateValue : string
-
Set date value
- $value : string
-
Value to test
Return values
bool —isInRange()
Test if a value is within a range
public
isInRange(string $dateValue, string $value) : bool
Parameters
- $dateValue : string
-
Set date value
- $value : string
-
Value to test
Return values
bool —isRange()
Check if a value is a range
public
isRange(string $value) : bool
Parameters
- $value : string
-
Value to test
Return values
bool —isSatisfied()
Check to see if a field is satisfied by a value
public
isSatisfied(string $dateValue, string $value) : bool
Parameters
- $dateValue : string
-
Date value to check
- $value : string
-
Value to test
Return values
bool —isSatisfiedBy()
public
isSatisfiedBy(DateTime $date, mixed $value) : mixed
Parameters
- $date : DateTime
- $value : mixed
Return values
mixed —validate()
public
validate(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —convertLiterals()
private
convertLiterals(mixed $string) : mixed
Parameters
- $string : mixed