for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* GpsLab component.
*
* @author Peter Gribanov <[email protected]>
* @copyright Copyright (c) 2016, Peter Gribanov
* @license http://opensource.org/licenses/MIT
*/
namespace GpsLab\Component\Interval\DateTime;
use GpsLab\Component\Interval\BaseIntervalPoint;
class DateTimeIntervalPoint extends BaseIntervalPoint
{
* @var \DateTime
private $date;
* @param \DateTime $date
public function __construct(\DateTime $date)
$this->date = clone $date;
}
* @return \DateTime
public function value()
return clone $this->date;
* @return string
public function __toString()
return $this->value()->format('Y-m-d H:i:s');