/** * Constructor. * * @param mixed $date Either a Joomla\DateTime object, a PHP DateTime object * or a string in a format accepted by strtotime(). * * @since 2.0.0 */ public function __construct($date) { if (!$date instanceof DateTime) { $date = new DateTime($date); } $this->datetime = $date->startOfDay(); }