I have require first sunday date of every month using php code.
please can help me.
getSunday();
You can use the Date/Time extension.
$start = new DateTime('2012-12-31');
$end = new DateTime('2013-12-31');
$interval = DateInterval::createFromDateString('first sunday of next month');
$period = new DatePeriod($start, $interval, $end, DatePeriod::EXCLUDE_START_DATE);
foreach($period as $time) {
echo $time->format("F jS") . "
\n";
}
/*
January 6th
February 3rd
March 3rd
April 7th
May 5th
June 2nd
July 7th
August 4th
September 1st
October 6th
November 3rd
December 1st
*/