Suppose we have a time interval like this:
$interval = new \DateInterval('P1M');
Is there a way to calculate how many such intervals will occur in a year? I am specifically looking for something like division of the intervals [which does not work like this]:
$interval = new \DateInterval('P1M');
$year = new \DateInterval('P1Y');
$ans = $year/$interval; //returns false
Answer: 12