- strftime: documentation ( source)
<?php
$period2 = new DatePeriod(
new DateTime('-3 months'),
DateInterval::createFromDateString('first day of next month'),
new DateTime('NOW')
);
$months = array();
$day = array();
foreach ($period2 as $p)
$day[] = strftime('%A', $p->getTimestamp());
echo $day;
?>