Lines Matching refs:value
13 * given day. As an example, if you were to specify "15W" as the value for the
18 * specify "1W" as the value for day-of-month, and the 1st is a Saturday, the
59 public function isSatisfiedBy(DateTime $date, $value)
61 // ? states that the field value is to be skipped
62 if ($value == '?') {
69 if ($value == 'L') {
73 // Check to see if this is the nearest weekday to a particular value
74 if (strpos($value, 'W')) {
76 $targetDay = substr($value, 0, strpos($value, 'W'));
85 return $this->isSatisfied($date->format('d'), $value);
102 * Validates that the value is valid for the Day of the Month field
106 * @param string $value
109 public function validate($value)
112 if ($value === '?' || $value === '*' || $value === 'L') {
117 if ((bool) preg_match('/^\d{1,2}$/', $value) && ($value >= 1 && $value <= 31)) {
122 if ((bool) preg_match('/-/', $value)) {
124 if ((bool) preg_match('/,/', $value)) {
128 $chunks = explode('-', $value);
138 // If you have a comma, we will deal with each value
139 if ((bool) preg_match('/,/', $value)) {
141 if ((bool) preg_match('/-/', $value)) {
145 $chunks = explode(',', $value);
156 if ((bool) preg_match('/\//', $value)) {
157 $chunks = explode('/', $value);
167 if ((bool) preg_match('/^\d{1,2}W$/', $value)) {