nextOccurrence < start check

master
Tanguy Pruvot 2010-10-29 14:04:21 +02:00
rodzic 90db32ce7f
commit e81a439d4f
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
<?php
define('SG_ICALREADER_VERSION', '0.5.1-tpruvot');
define('SG_ICALREADER_VERSION', '0.6.0-tpruvot');
/**
* A simple iCal parser. Should take care of most stuff for ya

Wyświetl plik

@ -24,7 +24,8 @@
*/
class SG_iCal_Freq {
protected $weekdays = array('MO'=>'monday', 'TU'=>'tuesday', 'WE'=>'wednesday', 'TH'=>'thursday', 'FR'=>'friday', 'SA'=>'saturday', 'SU'=>'sunday');
protected $knownRules = array('month', 'weekno', 'day', 'monthday', 'yearday', 'hour', 'minute');
protected $knownRules = array('month', 'weekno', 'day', 'monthday', 'yearday', 'hour', 'minute'); //others : 'setpos', 'second'
protected $ruleModifiers = array('wkst');
protected $simpleMode = true;
protected $rules = array('freq'=>'yearly', 'interval'=>1);
@ -97,7 +98,7 @@ class SG_iCal_Freq {
* @return int
*/
public function nextOccurrence( $offset ) {
//return $this->findNext( $this->previousOccurrence( $offset) );
$start = ($offset > $this->start) ? $offset : $this->start;
return $this->findNext($offset);
}