pub struct NetworkdaysIntlFn;Expand description
Returns the number of working days between two dates with configurable weekends.
§Remarks
- The
weekendargument can be a number code (1-7, 11-17) or a 7-character string of0s and1s (Mon-Sun,1= weekend day). Default is1(Sat/Sun). - The optional
holidaysargument accepts a range or array of date serials to exclude. - If
start_date > end_date, the result is negative. - A weekend string of all
1s (no workdays) returns#VALUE!.
§Examples
=NETWORKDAYS.INTL(DATE(2024,1,1), DATE(2024,1,31))title: "Default weekends (same as NETWORKDAYS)"
formula: "=NETWORKDAYS.INTL(DATE(2024,1,1), DATE(2024,1,31))"
expected: 23title: "Friday-only weekend"
formula: "=NETWORKDAYS.INTL(DATE(2024,1,1), DATE(2024,1,7), 16)"
expected: 6title: "Custom weekend string (Mon+Fri off)"
formula: "=NETWORKDAYS.INTL(DATE(2024,1,1), DATE(2024,1,7), \"1000100\")"
expected: 5related:
- NETWORKDAYS
- WORKDAY.INTL
- WEEKDAY
faq:
- q: "What happens if the weekend string is all 1s?"
a: "NETWORKDAYS.INTL returns #VALUE! because there would be no workdays."Trait Implementations§
Source§impl Debug for NetworkdaysIntlFn
impl Debug for NetworkdaysIntlFn
Source§impl Function for NetworkdaysIntlFn
[formualizer-docgen:schema:start]
Name: NETWORKDAYS.INTL
Type: NetworkdaysIntlFn
Min args: 2
Max args: variadic
Variadic: true
Signature: NETWORKDAYS.INTL(arg1: number@scalar, arg2: number@scalar, arg3: any@scalar, arg4…: any@scalar)
Arg schema: arg1{kinds=number,required=true,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=false}; arg2{kinds=number,required=true,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=false}; arg3{kinds=any,required=true,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=false}; arg4{kinds=any,required=true,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=false}
Caps: PURE
[formualizer-docgen:schema:end]
impl Function for NetworkdaysIntlFn
[formualizer-docgen:schema:start] Name: NETWORKDAYS.INTL Type: NetworkdaysIntlFn Min args: 2 Max args: variadic Variadic: true Signature: NETWORKDAYS.INTL(arg1: number@scalar, arg2: number@scalar, arg3: any@scalar, arg4…: any@scalar) Arg schema: arg1{kinds=number,required=true,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=false}; arg2{kinds=number,required=true,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=false}; arg3{kinds=any,required=true,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=false}; arg4{kinds=any,required=true,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=false} Caps: PURE [formualizer-docgen:schema:end]
fn name(&self) -> &'static str
fn min_args(&self) -> usize
fn variadic(&self) -> bool
fn arg_schema(&self) -> &'static [ArgSchema]
Source§fn eval<'a, 'b, 'c>(
&self,
args: &'c [ArgumentHandle<'a, 'b>],
_ctx: &dyn FunctionContext<'b>,
) -> Result<CalcValue<'b>, ExcelError>
fn eval<'a, 'b, 'c>( &self, args: &'c [ArgumentHandle<'a, 'b>], _ctx: &dyn FunctionContext<'b>, ) -> Result<CalcValue<'b>, ExcelError>
fn namespace(&self) -> &'static str
fn volatile(&self) -> bool
Source§fn aliases(&self) -> &'static [&'static str]
fn aliases(&self) -> &'static [&'static str]
Source§fn dependency_contract(
&self,
_arity: usize,
) -> Option<FunctionDependencyContract>
fn dependency_contract( &self, _arity: usize, ) -> Option<FunctionDependencyContract>
fn function_salt(&self) -> u64
Source§fn eval_reference<'a, 'b, 'c>(
&self,
_args: &'c [ArgumentHandle<'a, 'b>],
_ctx: &dyn FunctionContext<'b>,
) -> Option<Result<ReferenceType, ExcelError>>
fn eval_reference<'a, 'b, 'c>( &self, _args: &'c [ArgumentHandle<'a, 'b>], _ctx: &dyn FunctionContext<'b>, ) -> Option<Result<ReferenceType, ExcelError>>
Source§fn dispatch<'a, 'b, 'c>(
&self,
args: &'c [ArgumentHandle<'a, 'b>],
ctx: &dyn FunctionContext<'b>,
) -> Result<CalcValue<'b>, ExcelError>
fn dispatch<'a, 'b, 'c>( &self, args: &'c [ArgumentHandle<'a, 'b>], ctx: &dyn FunctionContext<'b>, ) -> Result<CalcValue<'b>, ExcelError>
Auto Trait Implementations§
impl Freeze for NetworkdaysIntlFn
impl RefUnwindSafe for NetworkdaysIntlFn
impl Send for NetworkdaysIntlFn
impl Sync for NetworkdaysIntlFn
impl Unpin for NetworkdaysIntlFn
impl UnsafeUnpin for NetworkdaysIntlFn
impl UnwindSafe for NetworkdaysIntlFn
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more