gs_quant.datetime.date.is_business_day — gs_quant 0.1 documentation

# gs_quant.datetime.date.is_business_day

`is_business_day`(dates, calendars=(), week_mask=None)

  Determine whether each date in dates is a business day

  Parameters

    - dates (`Union`[`date`, `Iterable`[`date`]]) – The input date or dates

    - calendars (`Union`[`str`, `Tuple`[`str`, …]]) – Calendars to use for holidays

    - week_mask (`Optional`[`str`]) – Which days are considered weekends (defaults to Saturday and Sunday)

  Return type

    `Union`[`bool`, `Tuple`[`bool`]]

  Returns

    True/False if dates is a single date. A tuple indicating True/False for each date if dates is an iterable

  Examples

      >>> import datetime as dt
      >>> is_business_day(dt.date.today())
      >>> is_business_day(dt.date(2019, 7, 4), calendars=('NYSE',))