code: public function offsetSet($offset, $value)
      {
          if (!$offset instanceof Date) {
              $offset = new Date($offset);
          }
  
          $index = $this->searchOffset($offset);
          if (is_null($index)) {
              $this->storage[] = array($offset, $value);
          } else {
              $this->storage[$index] = array($offset, $value);
          }
  
          $this->isOrdered = false;
      }
docs: (PHP 5 &gt;= 5.1.0)<br/>
  Offset to set
  @link http://php.net/manual/en/arrayaccess.offsetset.php
  @param mixed $offset <p>
  The offset to assign the value to.
  </p>
  @param mixed $value <p>
  The value to set.
  </p>
  @return void