Skip to main content

weekmask_open_days

Function weekmask_open_days 

pub(crate) fn weekmask_open_days(
    from: NaiveDate,
    to: NaiveDate,
    weekmask: [bool; 7],
) -> i64
Expand description

Open (non-weekend) days by weekmask alone in the half-open date range [from, to) (from <= to), in O(1): whole weeks contribute the mask’s open count, the remainder walks at most six weekdays.