lib/calendar.js
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;
  }
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;
  }
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 ; }
Returns holidays by month and year.
@param {number} month
@param {number} year
@param {boolean} [includeWeekends] include holidays falling on a weekend (default: false)
Returns holidays by month and year .