QS.CALENDAR.BUSINESS.DAYS.BETWEEN¶
Counts signed business days between ISO dates with optional boundary inclusion
Category: QuantSupport - Time.
- QS.CALENDAR.BUSINESS.DAYS.BETWEEN(from: text, to: text, calendar: text, include_first: cell or range, include_last: cell or range) integer¶
- Parameters:
from (text) – ISO date bound in YYYY-MM-DD format within 1902-01-01..2198-12-31; reversed bounds produce a negative count with endpoint flags swapped
to (text) – ISO date bound in YYYY-MM-DD format within 1902-01-01..2198-12-31; reversed bounds produce a negative count with endpoint flags swapped
calendar (text) – Canonical calendar, e.g. Canada(Settlement), Switzerland, China(IB), or JointCalendar(JoinHolidays,TARGET,Japan)
include_first (cell or range) – Optional TRUE/FALSE or numeric flag (nonzero is TRUE) including the from bound when it is a business day; omitted or blank defaults to TRUE
include_last (cell or range) – Optional TRUE/FALSE or numeric flag (nonzero is TRUE) including the to bound when it is a business day; omitted or blank defaults to FALSE
- Returns:
Signed integer business-day count with optional endpoint inclusion (first TRUE, last FALSE by default). Reversed bounds negate the forward count with endpoint flags swapped. Equal bounds count one only when both flags are TRUE and the date is a business day.
- Return Type:
integer
- Errors:
#VALUE! for an invalid canonical calendar or ISO date, a date outside 1902-01-01..2198-12-31, or a non-boolean/nonnumeric endpoint flag. Reversed bounds are supported.
Formula¶
=QS.CALENDAR.BUSINESS.DAYS.BETWEEN(from, to, calendar, include_first, include_last)
Calculation¶
Thread-safe worksheet function.
Native Declaration¶
fn qs_calendar_business_days_between (from : & str , to : & str , calendar : & str , include_first : * const xll_rs :: types :: XLOPER12 , include_last : * const xll_rs :: types :: XLOPER12 ,) -> Result < i32 , XllError >