/// import Holidays from "date-holidays"; import dayjs from "dayjs"; /** * Factory function that creates a businessDays object. * * @param {string} options.state – U.S. state to determine holidays. Eg. "pa". Defaults to "USA" * @param {Array} options.excludeHolidays – list of strings with holiday names to exclude from being considered as non-business days. * @returns {businessDays} businessDays object */ declare const businessDays: ({ state, excludeHolidays, addHolidays, }?: { state?: string | undefined; excludeHolidays?: never[] | undefined; addHolidays?: never[] | undefined; }) => { hd: Holidays; USState: string; /** * Returns an array of all public holidays for a given year. * * @param {string | number | Date} year – year to get holidays for. Defaults to current year if not provided. * @returns {Array} */ getHolidays(year?: string | number | Date): import("date-holidays").HolidaysTypes.Holiday[]; /** * Returns false if input date is on a weekend or a public holiday in Pennsylvania, USA. * * @param {string | Date | dayjs.Dayjs} inputDate - date to check. * @returns {bool} true if inputDate is a weekend or holiday */ check(inputDate: string | Date | dayjs.Dayjs): boolean; /** * Adds business days to a date and returns a new date as a DayJS object. First date is excluded from count by default. * * @param {string | Date | dayjs.Dayjs} inputDate - a date to begin calculation from. * @param {number} days - number of days to add to inputDate * @param {bool} [options.excludeInitialDate=true] - whether to exclude the first date when adding. * @returns {dayjs} */ addDays(inputDate: string | Date | dayjs.Dayjs, days: number, { excludeInitialDate }?: { excludeInitialDate?: boolean | undefined; }): dayjs.Dayjs; /** * Returns an object with a tally of the number of business days, weekend days, and public holidays between two dates. First date is excluded from count by default. * * @param {string | Date | dayjs.Dayjs} dateStart - a date to begin calculation from. * @param {string | Date | dayjs.Dayjs} dateEnd - a date to begin calculation from. * @param {bool} [options.excludeInitialDate=true] - whether to exclude the first date when adding. * @returns {dayjs} */ countDays(dateStart: string | Date | dayjs.Dayjs, dateEnd: string | Date | dayjs.Dayjs, { excludeInitialDate }?: { excludeInitialDate?: boolean | undefined; }): { totalDays: number; holidays: number; holidayList: import("date-holidays").HolidaysTypes.Holiday[]; weekdays: number; weekendDays: number; holidaysOnWeekends: number; businessDays: number; nonBusinessDays: number; }; }; export default businessDays;