DaemonHK

Untitled

Apr 27th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. function getStartAndEndDate($week,$year){
  2.     $dto=new DateTime();
  3.     $dto->setISODate($year,$week);
  4.     $return[1]=$dto->format("d.m.Y");
  5.  
  6.     for($i=1;$i<=6;){
  7.         $dto->modify("+1 day");
  8.         $return[$i+1]=$dto->format("d.m.Y");
  9.         $i++;
  10.     }
  11.  
  12.     return $return;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment