HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
DayOfMonthField Class Reference
Inheritance diagram for DayOfMonthField:
Collaboration diagram for DayOfMonthField:

Public Member Functions

 isSatisfiedBy (DateTime $date, $value)
 increment (DateTime $date, $invert=false)
 validate ($value)
- Public Member Functions inherited from AbstractField
 isSatisfied ($dateValue, $value)
 isRange ($value)
 isIncrementsOfRanges ($value)
 isInRange ($dateValue, $value)
 isInIncrementsOfRanges ($dateValue, $value)

Static Private Member Functions

static getNearestWeekday ($currentYear, $currentMonth, $targetDay)

Detailed Description

Day of month field. Allows: * , / - ? L W.

'L' stands for "last" and specifies the last day of the month.

The 'W' character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only be specified when the day-of-month is a single day, not a range or list of days.

Author
Michael Dowling mtdow.nosp@m.ling.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 21 of file DayOfMonthField.php.

Member Function Documentation

static DayOfMonthField::getNearestWeekday (   $currentYear,
  $currentMonth,
  $targetDay 
)
staticprivate

Get the nearest day of the week for a given day in a month.

Parameters
int$currentYearCurrent year
int$currentYearCurrent month
int$targetDayTarget day of the month
Returns
DateTime Returns the nearest date

Definition at line 32 of file DayOfMonthField.php.

Here is the caller graph for this function:

DayOfMonthField::increment ( DateTime  $date,
  $invert = false 
)

{When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field.

Parameters
DateTime$dateDateTime object to change
bool$invert(optional) Set to TRUE to decrement
Returns
FieldInterface
}

Implements FieldInterface.

Definition at line 86 of file DayOfMonthField.php.

DayOfMonthField::isSatisfiedBy ( DateTime  $date,
  $value 
)

{Check if the respective value of a DateTime field satisfies a CRON exp.

Parameters
DateTime$dateDateTime object to check
string$valueCRON expression to test against
Returns
bool Returns TRUE if satisfied, FALSE otherwise
}

Implements FieldInterface.

Definition at line 58 of file DayOfMonthField.php.

Here is the call graph for this function:

DayOfMonthField::validate (   $value)

{Validates a CRON expression for a given field.

Parameters
string$valueCRON expression value to validate
Returns
bool Returns TRUE if valid, FALSE otherwise
}

Implements FieldInterface.

Definition at line 102 of file DayOfMonthField.php.


The documentation for this class was generated from the following file: