Write a PHP function to get start and end date of a week (by week number) of a particular year. code example
Example: week starting date and end date in php
<?php$week=29;$year=2017;function getStartAndEndDate($week, $year) { $dateTime = new DateTime(); $dateTime->setISODate($year, $week); $result['start_date'] = $dateTime->format('d-M-Y'); $dateTime->modify('+6 days'); $result['end_date'] = $dateTime->format('d-M-Y'); return $result;}$dates=getStartAndEndDate($week,$year);print_r($dates);?>