Logo Search packages:      
Sourcecode: davical version File versions  Download package

iCalDate::iCalDate ( input )

#@- The constructor takes either an iCalendar date, a text string formatted as an iCalendar date, or epoch seconds.

Definition at line 50 of file RRule.php.

References SetEpochDate(), SetGMTDate(), and SetLocalDate().

Referenced by DateDifference().

                              {
    if ( gettype($input) == 'object' ) {
      $this->_text = $input->_text;
      $this->_epoch = $input->_epoch;
      $this->_yy = $input->_yy;
      $this->_mo = $input->_mo;
      $this->_dd = $input->_dd;
      $this->_hh = $input->_hh;
      $this->_mi = $input->_mi;
      $this->_ss = $input->_ss;
      $this->_tz = $input->_tz;
      return;
    }

    $this->_wkst = 1; // Monday
    if ( preg_match( '/^\d{8}T\d{6}$/', $input ) ) {
      $this->SetLocalDate($input);
    }
    else if ( preg_match( '/^\d{8}T\d{6}Z$/', $input ) ) {
      $this->SetGMTDate($input);
    }
    else if ( intval($input) == 0 ) {
      return;
    }
    else {
      $this->SetEpochDate($input);
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index