CBPCalc::getCalendarHolidays: Bitrix method

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

    
private function getCalendarHolidays()
    {
        if (static::
$yearHolidays === null)
        {
            
$calendarSettings CCalendar::GetSettings();
            
$weekHolidays = [06];
            
$yearHolidays = [];

            if (isset(
$calendarSettings['week_holidays']))
            {
                
$weekDays = ['SU' => 0'MO' => 1'TU' => 2'WE' => 3'TH' => 4'FR' => 5'SA' => 6];
                
$weekHolidays = [];
                foreach (
$calendarSettings['week_holidays'] as $day)
                    
$weekHolidays[] = $weekDays[$day];
            }

            if (isset(
$calendarSettings['year_holidays']))
            {
                foreach (
explode(','$calendarSettings['year_holidays']) as $yearHoliday)
                {
                    
$date explode('.'trim($yearHoliday));
                    if (
count($date) == && $date[0] && $date[1])
                        
$yearHolidays[] = (int)$date[0].'.'.(int)$date[1];
                }
            }
            static::
$weekHolidays $weekHolidays;
            static::
$yearHolidays $yearHolidays;
        }

        return [static::
$weekHolidays, static::$yearHolidays];
    }