lib/date-utils.js
function(year) {
    var self = this;
    var date = this.easterSunday(year);
    var dayOfWeek = null;

    function resolveFriday() {
      if (dayOfWeek === self.FRIDAY) {
        return date;
      } else {
        date = self.subtractDays(date, 1);
        dayOfWeek = self.getDayOfWeek(date);
        return resolveFriday();
      }
    }

    return resolveFriday();
  }
function(year) {
    var self = this;
    var date = this.easterSunday(year);
    var dayOfWeek = null;

    function resolveFriday() {
      if (dayOfWeek === self.FRIDAY) {
        return date;
      } else {
        date = self.subtractDays(date, 1);
        dayOfWeek = self.getDayOfWeek(date);
        return resolveFriday();
      }
    }

    return resolveFriday();
  }
function ( year ) { var self = this ; var date = this . easterSunday ( year ) ; var dayOfWeek = null ; function resolveFriday ( ) { if ( dayOfWeek === self . FRIDAY ) { return date ; } else { date = self . subtractDays ( date , 1 ) ; dayOfWeek = self . getDayOfWeek ( date ) ; return resolveFriday ( ) ; } } return resolveFriday ( ) ; }
Determines the date of Good Friday.
Friday before Easter Sunday
@param {number} year
@return {Date}
Determines the date of Good Friday . Friday before Easter Sunday