I understand how date period works with one exception, is there a way to find out from date period how many intervals there are?
So for instance:
// define the period of the range
$period = new DatePeriod($begin, $rangeType, $end);
// iterate through the dates in range
foreach ( $period as $dt ) {
}
This is what I would like to do from the above code:
echo count($period);
Basically I want to know how many time the foreach
loop will end up running.