Add CombinedDateTime class calcDaysInteral wrapper functions

calcDaysIntervalNamedIndex for force using named index and returning only named index
calcDaysIntervalNumIndex for force using numeric index and returning only numeric index
This commit is contained in:
Clemens Schwaighofer
2025-04-01 11:15:00 +09:00
parent 32decdd037
commit b302fb4053
2 changed files with 85 additions and 1 deletions

View File

@@ -1068,8 +1068,32 @@ final class CoreLibsCombinedDateTimeTest extends TestCase
return_named:$return_named,
include_end_date:$include_end_date,
exclude_start_date:$exclude_start_date
)
),
'call calcDaysInterval'
);
if ($return_named) {
$this->assertEquals(
$expected,
\CoreLibs\Combined\DateTime::calcDaysIntervalNamedIndex(
$input_a,
$input_b,
include_end_date:$include_end_date,
exclude_start_date:$exclude_start_date
),
'call calcDaysIntervalNamedIndex'
);
} else {
$this->assertEquals(
$expected,
\CoreLibs\Combined\DateTime::calcDaysIntervalNumIndex(
$input_a,
$input_b,
include_end_date:$include_end_date,
exclude_start_date:$exclude_start_date
),
'call calcDaysIntervalNamedIndex'
);
}
}
/**