These holidays are always fixed
186731
def init_fixed_holidays
        # Third Monday of January
        @mlk_day              = january.mondays[2]

        # Third Monday of February
        @washingtons_birthday = february.mondays[2]

        # Last Monday of May
        @memorial_day         = may.mondays.last

        # First Monday of September
        @labor_day            = september.mondays.first

        # Second Monday of October
        @columbus_day         = october.mondays[1]

        # Fourth Thursday of November
        @thanksgiving         = november.thursdays[3]
      end
1144472
def p_always_comb(self, p):
        ''
        p[0] = AlwaysComb(p[2], p[3], lineno=p.lineno(1))
752078
function generateBankHolidays(year) {

  // return array of generated holidays
  return [

    newYearsSpecial(year),

    makeHoliday(
      holidays.martinLutherKingDay(year),
      { name: 'Martin Luther King Jr. Day', bank: true }
    ),

    makeHoliday(
      holidays.presidentsDay(year), // Washington's Birthday...
      { name: 'President\'s Day', bank: isWeekday },
      { name: 'President\'s Day (Observed)', bank: true }
    ),

    makeHoliday(
      holidays.memorialDay(year),
      { name: 'Memorial Day', bank: true }
    ),

    makeHoliday(
      holidays.independenceDay(year),
      { name: 'Independence Day', bank: isWeekday },
      { name: 'Independence Day (Observed)', bank: true }
    ),

    makeHoliday(
      holidays.laborDay(year),
      { name: 'Labor Day', bank: true }
    ),

    makeHoliday(
      holidays.columbusDay(year),
      { name: 'Columbus Day', bank: true }
    ),

    makeHoliday(
      holidays.veteransDay(year),
      { name: 'Veterans Day', bank: isWeekday },
      { name: 'Veterans Day (Observed)', bank: true }
    ),

    makeHoliday(
      holidays.thanksgiving(year),
      { name: 'Thanksgiving Day', bank: true }
    ),

    makeHoliday(
      holidays.christmas(year),
      { name: 'Christmas Day', bank: isWeekday },
      { name: 'Christmas Day (Observed)', bank: true }
    )
  ]
}
662953
void fixRepeatedly(String filename, ImmutableSet<DiagnosticType> unfixableErrors)
      throws IOException {
    for (int i = 0; i < MAX_FIXES; i++) {
      if (!fix(filename, unfixableErrors)) {
        break;
      }
    }
  }
1157574
def isholiday(self, date):
        
        date = parsefun(date)
        if self.holidays:
            # i is the index of first holiday >= date
            i = bisect.bisect_left(self.holidays, date)
            if i == 0 and date < self.holidays[0]:
                warn('Holiday list exhausted at start, ' \
                     'isholiday(%s) output may be incorrect.' % date)
            elif i == len(self.holidays):
                warn('Holiday list exhausted at end, ' \
                     'isholiday(%s) output may be incorrect.' % date)
            elif self.holidays[i] == date:
                return True
        return False
924359
def fixup(p, data_bits, ptr_bits, bits_set):
    
    for i in range(ptr_bits):
        if 0 != bits_set & (1 << i):
            p.inst(X(data_bits + i))
335215
def business_hours_schedule_holidays(self, id, **kwargs):
        ""
        api_path = "/api/v2/business_hours/schedules/{id}/holidays.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
379038
def fixed_values(self):
        
        values = []
        values.extend([ prefix_factor(param) * param['value'] for param in self.fixed_parameters ])
        values.extend([ prefix_factor(const) * get_constant(const['value']) for const in self.constants ])

        return tuple(values)
1330435
def holidays_set(self, year=None):
        ""
        return set([day for day, label in self.holidays(year)])
152203
public CurrencyDateCalculatorBuilder<E> crossCcyCalendar(final HolidayCalendar<E> crossCcyCalendar) {
        if (crossCcyCalendar != null) {
            this.crossCcyCalendar = crossCcyCalendar;
        }
        return this;
    }
1207576
public CurrencyDateCalculatorBuilder<E> ccy2Calendar(final HolidayCalendar<E> ccy2Calendar) {
        if (ccy2Calendar != null) {
            this.ccy2Calendar = ccy2Calendar;
        }
        return this;
    }
719160
@Override
    public final HolidayCalendar<E> setHolidays(final Set<E> holidays) {

        if (holidays == null) {
            this.holidays = Collections.emptyMap();
            return this;
        }

        final Map<String, E> newSet = new TreeMap<>();
        for (final E e : holidays) {
            newSet.put(toString(e), e);
        }
        this.holidays = Collections.unmodifiableMap(newSet);
        return this;
    }
696812
function setKokuminNoKyujitu(year, holidays) {
  if (year < 1988) {
    return;
  }
  var kokumin = [];
  var last = null;
  Object.keys(holidays).forEach(md => {
    var date = new Date(year, md.slice(0, -2) * 1 - 1, md.slice(-2) * 1);
    if (last){
      last.setTime(last.getTime() + A_DAY);
      if (last.getTime() + A_DAY === date.getTime()) {
        kokumin.push((last.getMonth() + 1) * 100 + last.getDate());
      }
    }
    last = date;
  });
  // 他の祝日や振替休日が優先される
  kokumin.forEach(x => holidays[x] = holidays[x] || '国民の休日');
}
960077
def every(time)
            ms = Scheduler.parse_in(time)
            event = Repeat.new(self, ms)
            event.progress &Proc.new if block_given?
            schedule(event)
            event
        end
980322
def add_holiday(self, start_dt, holiday_name, end_dt = None, calendar_id = 'notices'):
        ''''''

        assert(calendar_id in self.configured_calendar_ids.keys())
        calendarId = self.configured_calendar_ids[calendar_id]

        # Note: end_date is one day ahead e.g. for the New Years' holiday Dec 31-Jan 1st, we specify the end_date as Jan 2nd. This is what the calendar expects.
        if not end_dt:
            end_dt = start_dt
        start_date = date(year=start_dt.year, month=start_dt.month, day=start_dt.day)#, tzinfo=self.timezone)
        end_date = date(year=end_dt.year, month=end_dt.month, day=end_dt.day) + timedelta(days = 1) #, tzinfo=self.timezone)
        start_time = datetime(year=start_dt.year, month=start_dt.month, day=start_dt.day, hour=0, minute=0, second=0, tzinfo=self.timezone) + timedelta(days = -1)
        end_time = datetime(year=end_dt.year, month=end_dt.month, day=end_dt.day, hour=23, minute=59, second=59, tzinfo=self.timezone) + timedelta(days = 2)

        # Do not add the quarter multiple times
        events = self.get_events((start_time + timedelta(days = -1)).isoformat(), (end_time + timedelta(days = 1)).isoformat(), ignore_cancelled = True)
        for event in events:
            if event.summary.find(holiday_name) != -1:
                return False

        event_body = {
            'summary' : holiday_name,
            'description' : holiday_name,
            'start' : {'date' : start_date.isoformat(), 'timeZone' : self.timezone_string},
            'end' : {'date' : end_date.isoformat(), 'timeZone' : self.timezone_string},
            'status' : 'confirmed',
            'extendedProperties' : {
                'shared' : {
                    'event_type' : 'Holiday'
                }
            }
        }
        if abs((end_date - start_date).days) > 7:
            raise Exception('The range of dates from {0} to {1} is greater than expected. Please check to make sure that the dates are correct.'.format(start_date, end_date))
        elif end_date < start_date:
            raise Exception('Error: The end date {1} occurs before the start date ({0}).'.format(start_date, end_date))

        created_event = self.service.events().insert(calendarId = self.configured_calendar_ids[calendar_id], body = event_body).execute()
        return True
628174
def _holiday_entry(self):
        """"""
        holidays_list = self.get_holidays_for_year()
        holidays_list = [
            holiday for holiday, holiday_hdate in holidays_list if
            holiday_hdate.hdate == self.hdate
        ]
        assert len(holidays_list) <= 1

        # If anything is left return it, otherwise return the "NULL" holiday
        return holidays_list[0] if holidays_list else htables.HOLIDAYS[0]
598332
protected final void addChrstianHoliday (final ChronoLocalDate aDate,
                                           final String sPropertiesKey,
                                           final IHolidayType aHolidayType,
                                           final HolidayMap holidays)
  {
    final LocalDate convertedDate = LocalDate.from (aDate);
    holidays.add (convertedDate, new ResourceBundleHoliday (aHolidayType, sPropertiesKey));
  }