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

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

        if (dayOfWeek === self.FRIDAY) {
          midsummerEve = date;
        }
      }
    });

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

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

        if (dayOfWeek === self.FRIDAY) {
          midsummerEve = date;
        }
      }
    });

    return midsummerEve;
  }
function ( year ) { var self = this ; var month = 6 ; var midsummerEve ; self . range ( 19 , 26 ) . forEach ( function ( day ) { if ( ! midsummerEve ) { var date = self . createDate ( year , month , day ) ; var dayOfWeek = self . getDayOfWeek ( date ) ; if ( dayOfWeek === self . FRIDAY ) { midsummerEve = date ; } } } ) ; return midsummerEve ; }
Determines the date of Midsummer Eve.
Friday between June 19-25
@param {number} year
@return {Date}
Determines the date of Midsummer Eve . Friday between June 19 - 25