1 44 45 package org.jfree.date; 46 47 59 public class EasterSundayRule extends AnnualDateRule { 60 61 64 public EasterSundayRule() { 65 } 66 67 77 public SerialDate getDate(final int year) { 78 final int g = year % 19; 79 final int c = year / 100; 80 final int h = (c - c / 4 - (8 * c + 13) / 25 + 19 * g + 15) % 30; 81 final int i = h - h / 28 * (1 - h / 28 * 29 / (h + 1) * (21 - g) / 11); 82 final int j = (year + year / 4 + i + 2 - c + c / 4) % 7; 83 final int l = i - j; 84 final int month = 3 + (l + 40) / 44; 85 final int day = l + 28 - 31 * (month / 4); 86 return SerialDate.createInstance(day, month, year); 87 } 88 89 } 90 | Popular Tags |