I want to measure the number of weeks between 2 dates.
For example between 13-12-2015 and 14-12-2015 the function should return 2 weeks, because first date it's Sunday and second date it's Monday, so it's 2 different weeks.
This has to work with different year dates, and here is what I tried:
$d1= new \DateTime('2014-10-14');
$d2= new \DateTime('2015-12-15');
echo $d2->diff($d1)/7;
The result is 61, but in reality it should be 62.
Any tips?