[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/dragonmantank/cron-expression/src/Cron/ -> DayOfMonthField.php (summary)

(no description)

File Size: 164 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

DayOfMonthField:: (4 methods):
  getNearestWeekday()
  isSatisfiedBy()
  increment()
  validate()


Class: DayOfMonthField  - X-Ref

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.

getNearestWeekday(int $currentYear, int $currentMonth, int $targetDay)   X-Ref
Get the nearest day of the week for a given day in a month.

param: int $currentYear Current year
param: int $currentMonth Current month
param: int $targetDay Target day of the month
return: \DateTime|null Returns the nearest date

isSatisfiedBy(DateTimeInterface $date, $value, bool $invert)   X-Ref
{@inheritdoc}


increment(DateTimeInterface &$date, $invert = false, $parts = null)   X-Ref

param: \DateTime|\DateTimeImmutable $date

validate(string $value)   X-Ref
{@inheritdoc}




Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer