Function period_accruals
pub(crate) fn period_accruals(
day_count: DayCountFraction,
dates: &[NaiveDate],
) -> impl Iterator<Item = f64> + '_Expand description
Each period’s accrual under day_count. ACT/ACT.ICMA needs a reference
period, which a bare pair of dates does not carry, so it is taken from the
schedule’s tenor: the tenor here is the
regular period the schedule’s own periods round to most often, and a short
first period is measured against the tenor ending on its end, a short last
one against the tenor starting on its start. Regular periods are the tenor’s
share of a year either way; a long stub keeps the two-date reading.