// By iterating over the DatePeriod object, all of the// recurring dates within that period are printed.// Note that, in this case, 2012-07-01 is not printed.foreach ($period as $date) { echo $date->format('Y-m-d')."\n";}?>

The above example will output:

2012-07-08
2012-07-15
2012-07-22
2012-07-29

Notes

Unbound numbers of repetitions as specified by ISO 8601 section 4.5
"Recurring time interval" are not supported, i.e. neither passing
"R/..." as isostr nor passing
NULL as end would work.