lib/date-utils.js
function(year) {
    var self = this;
    var month = 6;
    var midsummerDay;

    self.range(20, 26).forEach(function(day) {
      if (!midsummerDay) {
        var date = self.createDate(year, month, day);
        var dayOfWeek = self.getDayOfWeek(date);

        if (dayOfWeek === self.SATURDAY) {
          midsummerDay = date;
        }
      }
    });

    return midsummerDay;
  }
function(year) {
    var self = this;
    var month = 6;
    var midsummerDay;

    self.range(20, 26).forEach(function(day) {
      if (!midsummerDay) {
        var date = self.createDate(year, month, day);
        var dayOfWeek = self.getDayOfWeek(date);

        if (dayOfWeek === self.SATURDAY) {
          midsummerDay = date;
        }
      }
    });

    return midsummerDay;
  }
function ( year ) { var self = this ; var month = 6 ; var midsummerDay ; self . range ( 20 , 26 ) . forEach ( function ( day ) { if ( ! midsummerDay ) { var date = self . createDate ( year , month , day ) ; var dayOfWeek = self . getDayOfWeek ( date ) ; if ( dayOfWeek === self . SATURDAY ) { midsummerDay = date ; } } } ) ; return midsummerDay ; }
Determines the date of Midsummer Day.
Saturday between June 20-26
@param {number} year
@return {Date}
Determines the date of Midsummer Day . Saturday between June 20 - 26