lib/calendar.js
function(year, includeWeekends) {
    initialize(year);

    includeWeekends = includeWeekends || false;

    var self = this;
    var holidays = [];

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

    Object.keys(self.year.holidays).forEach(function(month) {
      self.year.holidays[month].forEach(function(holiday) {
        holidays.push(holiday);
      });
    });

    return holidays;
  }
function(year, includeWeekends) {
    initialize(year);

    includeWeekends = includeWeekends || false;

    var self = this;
    var holidays = [];

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

    Object.keys(self.year.holidays).forEach(function(month) {
      self.year.holidays[month].forEach(function(holiday) {
        holidays.push(holiday);
      });
    });

    return holidays;
  }
function ( year , includeWeekends ) { initialize ( year ) ; includeWeekends = includeWeekends || false ; var self = this ; var holidays = [ ] ; if ( ! includeWeekends ) { self . year . discardWeekends ( ) ; } Object . keys ( self . year . holidays ) . forEach ( function ( month ) { self . year . holidays [ month ] . forEach ( function ( holiday ) { holidays . push ( holiday ) ; } ) ; } ) ; return holidays ; }
Returns holidays by year.
@param {number} year
@param {boolean} [includeWeekends] include holidays falling on a weekend (default: false)
@return {Array}
Returns holidays by year .