ARTICLE AD BOX
I need two DateTime objects to pass to a method. I'm not all that familiar with the class. After some head scratching and web searching, I have a working solution, but I don't like it.
Currently, I'm using strtotime inside a date call inside a new \DateTime call.
<?php // code $firstfriday = new \DateTime(date('d-m-Y',strtotime('first Friday of March '.$theYear))); $firstsaturday = new \DateTime(date('d-m-Y',strtotime('first Saturday of March '.$theYear))); // more codeThis works, but it feels clumsy. Is there a better way to do this? Please educate me.
