示例#1
0
 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;
 }
示例#2
0
 protected function __updateTimestamp()
 {
     $this->_timestampBegin = DateTime::timeToSeconds($this->_timeBegin);
     $this->_timestampEnd = DateTime::timeToSeconds($this->_timeEnd);
 }
示例#3
0
 public function __construct($time)
 {
     $this->_timestamp = is_string($time) ? MedOptima_DateTime::timeToSeconds($time) : $time;
 }