Class luya\web\jsonld\DateTimeValue

Inheritanceluya\web\jsonld\DateTimeValue » luya\web\jsonld\BaseValue
Available since version1.0.3
Source Code

A combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] (see Chapter 5.4 of ISO 8601).

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Provide datetime value. luya\web\jsonld\DateTimeValue
getValue() Get the value to assign from BaseValue. luya\web\jsonld\DateTimeValue

Method Details

Hide inherited methods

__construct() public method

Provide datetime value.

public void __construct ( $datetime )
$datetime string|integer

                public function __construct($datetime)
    $this->_datetime = $datetime;

getValue() public method

Get the value to assign from BaseValue.

public void getValue ( )

                public function getValue()
    if (is_numeric($this->_datetime)) {
        $this->_datetime = date("c", $this->_datetime);
    return $this->_datetime;