Last modified: 2012-01-24 20:00:58 UTC
looks to me like cur_date_jd is never reset after its initial value... so i've added the following to SMW_SetRecurringDate.php @189.. $cur_date_jd = $cur_date->getDataItem()->getJD(); #jmc It runs as expected now, stopping at the correct iteration.
Line 189 in what version? Trunk? Is it the line after "if ( $unit == 'year' ) {" ?
@line 41 there is a null entry in the array (which stores today's date), so... foreach ( $all_date_strings as $date_str ) { if( $date_str ){ SMWParseData::addProperty( $property_name, $date_str, false, $parser, true ); } }
(In reply to comment #2) > Line 189 in what version? Trunk? > > Is it the line after "if ( $unit == 'year' ) {" ? Not sure but line 189 has $cur_date = SMWDataValueFactory::newTypeIDValue( '_dat', $date_str );
to remove nulls better code is: $all_date_strings = array_filter($all_date_strings); #remove nulls
Sorry, I can't follow that. Can you provide a patch against trunk?
at line 188: $cur_date = SMWDataValueFactory::newTypeIDValue( '_dat', $date_str ); //add: recalc cur_date_jd cur_date_jd = $cur_date->getDataItem()->getJD(); at line 247: $all_date_strings = array_merge( $all_date_strings, $included_dates); //add: remove nulls from the dates array $all_date_strings = array_filter($all_date_strings);
r109944 Thanks for the patch :)