class Utilities {

    public static Day julianEaster3(int year, boolean gregorian) {
        int a = year % 19;
        int b = year % 4;
        int c = year % 7;
        int d = (19 * a + 15) % 30;
        int e = (2 * b + 4 * c - d + 34) % 7;
        int f = d + e + 114;
        /*
       * month and day give the Easter date in the Julian calendar
         */
        int month = f / 31;
        int day = (f % 31) + 1;
        Day easterJ = new Day(year, Month.valueOf(month - 1), day - 1);
        if (gregorian) {
            return JDN2GregorianDate(julianDate2JDN(year, month, day));
        } else {
            return easterJ;
        }
    }

}