# Class Time#getHolidaySchedule

Time

- Defined in: time.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Time#getHolidaySchedule(successCallback, errorCallback) Gets HolidaySchedule

## Class Detail

Time#getHolidaySchedule(successCallback, errorCallback)
Gets HolidaySchedule

    // Javascript code
     function getHolidaySchedules () {
         function successCb(cbObject) {
             console.log("cbObject : " + JSON.stringify(cbObject));
             for (var i = cbObject.holidayScheduleList.length-1; i>=0; i--) {
                 console.log("holidayScheduleList[" + i + "]._id : " + cbObject.holidayScheduleList[i]._id);
                 console.log("holidayScheduleList[" + i + "].month : " + cbObject.holidayScheduleList[i].settings.month);
                 console.log("holidayScheduleList[" + i + "].year : " + cbObject.holidayScheduleList[i].settings.year);
                 console.log("holidayScheduleList[" + i + "].date : " + cbObject.holidayScheduleList[i].settings.date);
                 console.log("holidayScheduleList[" + i + "].repeatBy : " + cbObject.holidayScheduleList[i].settings.repeatBy);
                 console.log("holidayScheduleList[" + i + "].days : " + cbObject.holidayScheduleList[i].settings.days);
                 console.log("holidayScheduleList[" + i + "].repeat : " + cbObject.holidayScheduleList[i].settings.repeat);
             }
         }
         function failureCb(cbObject) {
             var errorCode = cbObject.errorCode;
             var errorText = cbObject.errorText;
             console.log ("Error Code [" + errorCode + "]: " + errorText);
         }
         var time = new Time();
         time.getHolidaySchedule(successCb, failureCb);
     }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.

Since:
  1.5
Returns:
  {Object}

  Property | Type | Description
  --- | --- | ---
  holidayScheduleList[] | Array | holiday schedule list
  holidayScheduleList[]._id | String | schedule id
  holidayScheduleList[].month | Number | month
  holidayScheduleList[].year | Number | year
  holidayScheduleList[].date | Number | date
  holidayScheduleList[].repeatBy | String | repeatBy
  holidayScheduleList[].days | Number | days
  holidayScheduleList[].repeat | String | repeat

See:
  Time.setHolidaySchedule()
  Time.unsetHolidaySchedule()