public function splitRange($from, $to, $step) { if (is_string($from)) { $from = DateTime::timeToSeconds($from); } if (is_string($to)) { $to = DateTime::timeToSeconds($to); } if (is_string($step)) { $step = DateTime::timeToSeconds($step); } $list = array(); while ($from <= $to) { $list[$from] = (new MedOptima_DateTime_Duration_InsideDay($from))->toString(); $from += $step; } return $list; }
protected function __updateTimestamp() { $this->_timestampBegin = DateTime::timeToSeconds($this->_timeBegin); $this->_timestampEnd = DateTime::timeToSeconds($this->_timeEnd); }
public function __construct($time) { $this->_timestamp = is_string($time) ? MedOptima_DateTime::timeToSeconds($time) : $time; }