Merge branch 'wip/fix-incorrect-obj-call-in-expand-byday' into 'master'

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

See merge request davical-project/davical!148
This commit is contained in:
k0walski 2026-05-12 10:23:55 +00:00
commit 182896fc2b

View File

@ -1011,7 +1011,7 @@ class RepeatRule {
$dow = self::rrule_day_number($matches[3]); $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. $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]); $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 ) { if ( $whichweek > 0 ) {
$whichweek--; $whichweek--;
$yearday = $first_doy; $yearday = $first_doy;