format( DateTime::ISO8601 ) ); } /** * * @var null|string */ public $value; /** * * @param string $value */ public function __construct( $value ) { $this->value = $value; } /** * * @return DateTime */ public function asDateTime() { $dateTime = DateTime::createFromFormat( DateTime::ISO8601, $this->value ); return $dateTime; } public function jsonSerialize() { return $this->value; } }