https://developer.zendesk.com/rest_api/docs/core/schedules#list-holidays-for-a-schedule
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)
831485
@Nonnull
  @ReturnsMutableCopy
  private HolidayMap _getHolidays (final int nYear,
                                   @Nonnull final Configuration aConfig,
                                   @Nullable final String... aArgs)
  {
    if (LOGGER.isDebugEnabled ())
      LOGGER.debug ("Adding holidays for " + aConfig.getDescription ());

    final HolidayMap aHolidayMap = new HolidayMap ();
    for (final IHolidayParser aParser : _getParsers (aConfig.getHolidays ()))
      aParser.parse (nYear, aHolidayMap, aConfig.getHolidays ());

    if (ArrayHelper.isNotEmpty (aArgs))
    {
      final String sHierarchy = aArgs[0];
      for (final Configuration aSubConfig : aConfig.getSubConfigurations ())
      {
        if (sHierarchy.equalsIgnoreCase (aSubConfig.getHierarchy ()))
        {
          // Recursive call
          final HolidayMap aSubHolidays = _getHolidays (nYear,
                                                        aSubConfig,
                                                        ArrayHelper.getCopy (aArgs, 1, aArgs.length - 1));
          aHolidayMap.addAll (aSubHolidays);
          break;
        }
      }
    }
    return aHolidayMap;
  }
165216
function scheduleSearch( country, date, callback ) {
    var url = apiBaseUrl+endpoints['schedule'].replace('$1', country).replace('$2', date);

    fetch(url, function(result) {
        callback(result);
    });
}
712834
def get_verba_link_for_schedule(self, schedule):
        
        dao = Book_DAO()

        url = self.get_verba_url(schedule)

        response = dao.getURL(url, {"Accept": "application/json"})
        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)

        for key in data:
            if re.match(r'^[A-Z]{2}[0-9]{5}$', key):
                return "%s%s&quarter=%s" % (BOOK_PREFIX,
                                            key,
                                            schedule.term.quarter)
1072167
def business_hours_schedule_holiday_update(self, schedule_id, id, data, **kwargs):
        ""
        api_path = "/api/v2/business_hours/schedules/{schedule_id}/holidays/{id}.json"
        api_path = api_path.format(schedule_id=schedule_id, id=id)
        return self.call(api_path, method="PUT", data=data, **kwargs)
704968
def scheduled_special_times(calendar, start, end, time, tz):
    
    days = calendar.holidays(start, end)
    return pd.Series(
        index=pd.DatetimeIndex(days, tz=UTC),
        data=days_at_time(days, time, tz=tz),
    )
896855
def get_holidays_for_year(self, types=None):
        
        # Filter any non-related holidays depending on Israel/Diaspora only
        holidays_list = [
            holiday for holiday in htables.HOLIDAYS if
            (holiday.israel_diaspora == "") or
            (holiday.israel_diaspora == "ISRAEL" and not self.diaspora) or
            (holiday.israel_diaspora == "DIASPORA" and self.diaspora)]

        if types:
            # Filter non-matching holiday types.
            holidays_list = [
                holiday for holiday in holidays_list if
                holiday.type in types
            ]

        # Filter any special cases defined by True/False functions
        holidays_list = [
            holiday for holiday in holidays_list if
            all(func(self) for func in holiday.date_functions_list)]

        def holiday_dates_cross_product(holiday):
            """Given a (days, months) pair, compute the cross product.

            If days and/or months are singletons, they are converted to a list.
            """
            return product(*([x] if isinstance(x, int) else x
                             for x in holiday.date))

        # Compute out every actual Hebrew date on which a holiday falls for
        # this year by exploding out the possible days for each holiday.
        holidays_list = [
            (holiday, HDate(
                heb_date=HebrewDate(self.hdate.year, date_instance[1],
                                    date_instance[0]),
                diaspora=self.diaspora,
                hebrew=self.hebrew))
            for holiday in holidays_list
            for date_instance in holiday_dates_cross_product(holiday)
            if len(holiday.date) >= 2
        ]
        return holidays_list
563840
private static void listCalendars(ProjectFile file)
   {
      for (ProjectCalendar cal : file.getCalendars())
      {
         System.out.println(cal.toString());
      }
   }
47231
def get_payroll_calendars(options = {})
      request_params = {}
      response_xml = http_get(client, "#{@payroll_url}/PayrollCalendars", request_params)
      parse_response(response_xml, {:request_params => request_params}, {:request_signature => 'GET/payroll_calendars'})
    end
1320323
def holidays(self, year=None):
        """"""
        if not year:
            year = date.today().year

        if year in self._holidays:
            return self._holidays[year]

        # Here we process the holiday specific calendar
        temp_calendar = tuple(self.get_calendar_holidays(year))

        # it is sorted
        self._holidays[year] = sorted(temp_calendar)
        return self._holidays[year]
815215
function(month, year, includeWeekends) {
    initialize(year, month);

    includeWeekends = includeWeekends || false;

    if (!month || !year) {
      throw Error('Month or year missing.');
    }

    var self = this;
    var holidays = [];

    if (!includeWeekends) {
      self.year.discardWeekends();
    }

    if (typeof self.year.holidays[month] !== 'undefined') {
      self.year.holidays[month].forEach(function(holiday) {
        holidays.push(holiday);
      });
    }

    return holidays;
  }
79639
def activity_list(date, sort, limit)
      date_param = format_date(date)
      if sort == "asc"
        date_param = "afterDate=#{date_param}"
      elsif sort == "desc"
        date_param = "beforeDate=#{date_param}"
      else
        raise FitgemOauth2::InvalidArgumentError, "sort can either be asc or desc"
      end
      get_call("user/#{user_id}/activities/list.json?offset=0&limit=#{limit}&sort=#{sort}&#{date_param}")
    end
519794
def get(self, request):
        """"""
        # Heavily inspired by https://djangosnippets.org/snippets/2223/ and
        # the icalendar documentation
        calendar = Calendar()
        site = get_current_site(request)
        calendar.add('prodid', '-//%s Schedule//%s//' % (site.name, site.domain))
        calendar.add('version', '2.0')

        # Since we don't need to format anything here, we can just use a list
        # of schedule items
        for item in ScheduleItem.objects.all():
            sched_event = Event()
            sched_event.add('dtstamp', item.last_updated)
            sched_event.add('summary', item.get_title())
            sched_event.add('location', item.venue.name)
            sched_event.add('dtstart', item.get_start_datetime())
            sched_event.add('duration', datetime.timedelta(minutes=item.get_duration_minutes()))
            sched_event.add('class', 'PUBLIC')
            sched_event.add('uid', '%s@%s' % (item.pk, site.domain))
            calendar.add_component(sched_event)
        response = HttpResponse(calendar.to_ical(), content_type="text/calendar")
        response['Content-Disposition'] = 'attachment; filename=schedule.ics'
        return response
1351996
function Calendars() {
		this.regionalOptions = [];
		this.regionalOptions[''] = {
			invalidCalendar: 'Calendar {0} not found',
			invalidDate: 'Invalid {0} date',
			invalidMonth: 'Invalid {0} month',
			invalidYear: 'Invalid {0} year',
			differentCalendars: 'Cannot mix {0} and {1} dates'
		};
		this.local = this.regionalOptions[''];
		this.calendars = {};
		this._localCals = {};
	}
1261194
def scheduled(self, offset=0, count=25):
        ''''''
        return self.client('jobs', 'scheduled', self.name, offset, count)
79377
private void processCalendarDays(ProjectCalendar calendar, Record root)
   {
      // Retrieve working hours ...
      Record daysOfWeek = root.getChild("DaysOfWeek");
      if (daysOfWeek != null)
      {
         for (Record dayRecord : daysOfWeek.getChildren())
         {
            processCalendarHours(calendar, dayRecord);
         }
      }
   }
1262071
protected void setHolidays(final String name, final DateCalculator<E> dc) {
        if (name != null) {
            dc.setHolidayCalendar(holidays.get(name));
        }
    }