Php – How to add one year to a DateTime in a leap Year
I want to get the last day of the month of the next year from a given date Here is how I did : $copy = new DateTime(); $lastDay = new DateTime($copy->add((new DateInterval('P1Y')))->format('Y-m-t')); This works exept in this exemple :…