I am trying to use a DateTime object to calculate the current date from the number of days since January 1st. Leap years are very important here. This does not seem to take leap years into account.
Here is my code:
$date = DateTime::createFromFormat('z Y', '59 2016'); echo $date->format('n/j/Y')."\n"; die();
source share