function _cronMonDaysFromWeekDays in Elysia Cron 6
Same name and namespace in other branches
- 5.2 elysia_cron_scheduler_old.inc \_cronMonDaysFromWeekDays()
- 5 elysia_cron_scheduler_old.inc \_cronMonDaysFromWeekDays()
- 6.2 elysia_cron_scheduler_old.inc \_cronMonDaysFromWeekDays()
- 7.2 elysia_cron_scheduler.inc \_cronMonDaysFromWeekDays()
- 7 elysia_cron_scheduler_old.inc \_cronMonDaysFromWeekDays()
1 call to _cronMonDaysFromWeekDays()
File
- ./
elysia_cron_scheduler_old.inc, line 120
Code
function _cronMonDaysFromWeekDays($year, $mon, $weekdays) {
$result = array();
for ($i = 1; checkdate($mon, $i, $year); $i++) {
$w = date('w', mktime(12, 00, 00, $mon, $i, $year));
if (in_array($w, $weekdays)) {
$result[] = $i;
}
}
return $result;
}