ALToolbox.business_days
holidays
pd
datetime
dt
as_datetime
DADateTime
Union
Dict
Iterable
Mapping
Optional
__all__
standard_holidays
def standard_holidays(
year,
country="US",
subdiv="MA",
add_holidays: Optional[Mapping] = None,
remove_holidays: Optional[Iterable[str]] = None
) -> holidays.HolidayBase
Get all holidays in the specified year, country, and state (or other subdivision). Note that this draws on the "holidays" package which may deviate slightly from holidays observed by a local court, but should be very close to accurate.
Arguments
year- the year to get holidays forcountry- the country to use holidays from (default: "US")subdiv- the subdivision (e.g. state or province) to use holidays from (default: "MA")add_holidays- a dictionary from date strings ("12-25") to the name of the holiday, to add custom holidaysremove_holidays- a list of holiday name strings to remove from the standard holidays