I would like to get a list of dates in the following format for a given year;
array:4 [▼
"04" => "25 Jan 2016 - 31 Jan 2016"
"03" => "18 Jan 2016 - 24 Jan 2016"
"02" => "11 Jan 2016 - 17 Jan 2016"
"01" => "4 Jan 2016 - 10 Jan 2016"
]
The array key shows the week number. The array value shows the dates.
If the year given is equal to the current year then I only want it to show dates up until the current week.
How can I achieve this?