int zeller(final int year, final int month, final int day) {
        /*
         * 蔡勒(Zeller)公式: 用于推算某个日期为星期几
         *
         *    仅适用于1582年10月5日以及之后
         *    参考:格里高利历
         *
         *  w = ([c/4] - 2c + y + [y/4] + [13(m+1)/5] + d - 1) mod 7
         *
         *  c = (int) (year / 100)
         *  y = year % 100
         *  m = month (3<=m<=14)
         *       2013-01 => 2012-13;
         *       2012-02 => 2011-14;
         *       2014-05 => 2014-05.
         *  d = day
         *
         */
        if (year < 1582) {
            return -1;
        }
        if (year == 1582
                && month < 10) {
            return -1;
        }
        if (year == 1582
                && month == 10
                && day < 5) {
            return -1;
        }
        int yearTmp = year;
        int m = month;
        if (month == 1 || month == 2) {
            yearTmp--;
            m += 12;
        }
        int c = yearTmp / 100;
        int y = yearTmp % 100;

        final int weak = ((c / 4) - (2 * c) + y + (y / 4) + (13 * (m + 1) / 5) + day - 1) % 7;
        return weak;
    }