Skip to main content
`Ctrl`+`K`

# pandas.tseries.offsets.BusinessDay.calendar

BusinessDay.calendar

  Return the calendar used for business day calculations.

  This property returns the numpy busdaycalendar object used for determining valid business days. For standard business day offsets (e.g., BusinessDay, BusinessHour), this returns None. For custom business day offsets, this returns the calendar that was either passed directly or constructed from weekmask and holidays.

  Returns:
    np.busdaycalendar or None

      The business day calendar used for calculations, or None if using default business day rules.

  See also

  `BusinessDay.holidays`

    Holidays for standard business day offset.

  `CustomBusinessDay.holidays`

    Holidays for custom business day offset.

  `CustomBusinessDay.weekmask`

    Weekmask for custom business day offset.

  Examples

  For standard business offsets, calendar is None:

      >>> bd = pd.offsets.BusinessDay()
      >>> bd.calendar is None
      True

      >>> bh = pd.offsets.BusinessHour()
      >>> bh.calendar is None
      True

  For custom business day with explicit holidays:

      >>> holidays = [pd.Timestamp("2023-12-25"), pd.Timestamp("2024-01-01")]
      >>> cbd = pd.offsets.CustomBusinessDay(holidays=holidays)
      >>> isinstance(cbd.calendar, np.busdaycalendar)
      True