CodeExplorer calcInterval example
if (\
is_string($interval) &&
ctype_digit($interval)) { $this->intervalInSeconds =
(int) $interval;
$this->description =
sprintf('every %d seconds',
$this->intervalInSeconds
);
return;
} try { if (\
is_string($interval) && 'P'
=== ($interval[0
] ?? ''
)) { $this->intervalInSeconds =
$this->
calcInterval(new \
DateInterval($interval));
$this->description =
sprintf('every %d seconds (%s)',
$this->intervalInSeconds,
$interval);
return;
} $i =
$interval;
if (\
is_string($interval)) { $this->description =
sprintf('every %s',
$interval);
$i = \DateInterval::
createFromDateString($interval);
} else { $a =
(array) $interval;