| Constant Name | Constant Value |
|---|---|
| FORMAT_SHORT | H:i |
| FORMAT_MEDIUM | h:ia |
| FORMAT_LONG | h:i:s a |
In file D:\oblib-core\php\oblib\dataType\dataEra.datatype.php between lines 210 and 263.
<?php
class dataTime extends dataEra
{
const FORMAT_SHORT = 'H:i';
const FORMAT_MEDIUM = 'h:ia';
const FORMAT_LONG = 'h:i:s a';
public function ___setValue ($mixNodeValue)
{
if (is_array ($mixNodeValue))
{
$mixNodeValue = mktime (
0, 0, 0,
(isset ($mixNodeValue ['Month']) ? $mixNodeValue ['Month'] : 0),
(isset ($mixNodeValue ['Day']) ? $mixNodeValue ['Day'] : 0),
(isset ($mixNodeValue ['Year']) ? $mixNodeValue ['Year'] : 0)
);
}
$this->_intTimestamp = $mixNodeValue;
}
public function ___getSql ()
{
if (!$this->_intTimestamp)
{
return NULL;
}
return date ('H:i:s', $this->_intTimestamp);
}
public function &___Render (DOMNode $domBase=NULL)
{
if ($this->Hour) $this->___Pop ($this->___Pull ('Hour'));
if ($this->Minute) $this->___Pop ($this->___Pull ('Minute'));
if ($this->Second) $this->___Pop ($this->___Pull ('Second'));
if ($this->FormatShort) $this->___Pop ($this->___Pull ('FormatShort'));
if ($this->FormatMedium) $this->___Pop ($this->___Pull ('FormatMedium'));
if ($this->FormatLong) $this->___Pop ($this->___Pull ('FormatLong'));
if ($this->_intTimestamp)
{
$this->___Push (new dataNumber ('Hour' , date ('H', $this->_intTimestamp)));
$this->___Push (new dataNumber ('Minute' , date ('i', $this->_intTimestamp)));
$this->___Push (new dataNumber ('Second' , date ('s', $this->_intTimestamp)));
$this->___Push (new dataString ('FormatShort' , date (self::FORMAT_SHORT , $this->_intTimestamp)));
$this->___Push (new dataString ('FormatMedium' , date (self::FORMAT_MEDIUM , $this->_intTimestamp)));
$this->___Push (new dataString ('FormatLong' , date (self::FORMAT_LONG , $this->_intTimestamp)));
}
return parent::___Render ($domBase);
}
}
?>