CBPCalc :: FunctionIsWorkDay: Bitrix method

      
<?php 
//  CBPCalc :: FunctionIsWorkDay()
//  /dist/bitrix/modules/bizproc/classes/general/calc.php:704

    
private function FunctionIsWorkDay($args)
    {
        if (!
CModule::IncludeModule('calendar'))
            return 
null;

        if (!
is_array($args))
            
$args = [$args];

        
$ar $this->ArrgsToArray($args);
        
$date array_shift($ar);
        
$user array_shift($ar);

        if (
$user)
        {
            
$date $this->FunctionToUserDate([$user$date]);
        }

        if ((
$date $this->makeTimestamp($datetrue)) === false)
            return 
null;

        return !
$this->isHoliday($date);
    }