for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace luya\web\jsonld;
/**
* A date value in ISO 8601 date format.
*
* Auto convert timestamp values to iso 8601 date.
* @author Basil Suter <[email protected]>
* @since 1.0.3
*/
class DateValue extends BaseValue
{
private $_date;
public function __construct($date)
$this->_date = $date;
}
public function getValue()
if (is_numeric($this->_date)) {
$this->_date = date("Y-m-d", $this->_date);
return $this->_date;