Function add_business_days

Source
pub fn add_business_days(
    start: &Series,
    n: &Series,
    week_mask: [bool; 7],
    holidays: &[i32],
    roll: Roll,
) -> Result<Series, PolarsError>
Expand description

Add a given number of business days.

§Arguments

  • start: Series holding start dates.
  • n: Number of business days to add.
  • week_mask: A boolean array of length 7, where true indicates that the day is a business day.
  • holidays: timestamps that are holidays. Must be provided as i32, i.e. the number of days since the UNIX epoch.
  • roll: what to do when the start date doesn’t land on a business day:
    • Roll::Forward: roll forward to the next business day.
    • Roll::Backward: roll backward to the previous business day.
    • Roll::Raise: raise an error.