# Class Time#setHolidaySchedule

Time

- Defined in: time.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Time#setHolidaySchedule(successCallback, errorCallback, options) Sets HolidaySchedule

## Class Detail

Time#setHolidaySchedule(successCallback, errorCallback, options)
Sets HolidaySchedule

    // Javascript code
     function setAllHolidaySchedules () {
         var params = {
             "holidaySchedule":[
             {
                 "settings":{
                      "year":2016,
                      "month":12,
                      "date":31,
                      "days":1,
                      "repeat":"none",
                      "repeatBy":"none"
                  },
                  "name":"Holiday Name 01"
                  }
             ]
         }
         function successCb(cbObject) {
             console.log("sucess");
             // Do something
         }
         function failureCb(cbObject) {
             var errorCode = cbObject.errorCode;
             var errorText = cbObject.errorText;
             console.log ("Error Code [" + errorCode + "]: " + errorText);
         }
         var time = new Time();
         time.setHolidaySchedule(successCb, failureCb, params);
     }

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

  Property | Type | Description
  --- | --- | ---
  holidaySchedule[] | Array | holiday schedule list
  holidaySchedule[].name | String | schedule name
  holidaySchedule[].settings.year | Number | year
  holidaySchedule[].settings.year | Number | month
  holidaySchedule[].settings.date | Number | date
  holidaySchedule[].settings.days | Number | day
  holidaySchedule[].settings.repeat | String | repeat
  holidaySchedule[].settings.repeatBy | String | repeatBy

Since:
  1.4
See:
  Time.getHolidaySchedule()
  Time.unsetHolidaySchedule()