Replace instance->format('c') ); with $first_of_year->format('c') ); call

This commit is contained in:
k0walski 2025-11-03 15:33:10 +02:00
parent fc4f6013db
commit 91c44ceddf

View File

@ -1011,7 +1011,7 @@ class RepeatRule {
$dow = self::rrule_day_number($matches[3]);
$first_doy = 1 + $dow - $dow_of_first; if ( $first_doy < 1 ) $first_doy +=7; // e.g. 1st=WE, dow=MO => 1+1-3=-1 => MO is 6th, etc.
$whichweek = intval($matches[2]);
if ( DEBUG_RRULE ) dbg_error_log( 'RRULE', "Expanding BYDAY(Y) $weekday from date %s", $instance->format('c') );
if ( DEBUG_RRULE ) dbg_error_log( 'RRULE', "Expanding BYDAY(Y) $weekday from date %s", $first_of_year->format('c') );
if ( $whichweek > 0 ) {
$whichweek--;
$yearday = $first_doy;