# Class Time#addHolidaySchedule

Time

- Defined in: time.js

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

## Class Detail

Time#addHolidaySchedule(successCallback, errorCallback, options)
add HolidaySchedule

    // Javascript code

    function addHolidaySchedule () {
      var options = {
    		startMonth : 3,
    		startDay : 7,
    		endMonth : 3,
    		endDay : 9 //ex. 3/7~3/9
    	 };

      function successCb() {
         // Do something
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var time = new Time();
      time.addHolidaySchedule(successCb, failureCb, options);
    }

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

  Property | Type | Description | Required
  --- | --- | --- | ---
  startMonth | Number | start month | required
  startDay | Number | start day | required
  endMonth | Number | end month | required
  endDay | Number | end day | required

Since:
  1.4
Returns:

  If the method is successfully executed, call the success callback function without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.

See:
  Time.getHolidayScheduleMode()