date('n', strtotime("first day of -1 month", $phpdate))
This resulted in januari being calculated as December (month -1)
Changed to:
(date('n', $phpdate)-1)
This takes the month, outside of the date function then subtracts one, resulting in the correct google graph pointer for month(0-11)
Since we no longer subtract one from the month inside the date function the first day of the month fix is also no longer required.
Old code:
date('n', strtotime("first day of -1 month", $phpdate)) This resulted in januari being calculated as December (month -1)
Changed to: (date('n', $phpdate)-1) This takes the month, outside of the date function then subtracts one, resulting in the correct google graph pointer for month(0-11) Since we no longer subtract one from the month inside the date function the first day of the month fix is also no longer required.