csharp 来自http://stackoverflow.com/questions/2510383/how-can-i-calculate-what-date-good-friday-falls-

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 来自http://stackoverflow.com/questions/2510383/how-can-i-calculate-what-date-good-friday-falls-相关的知识,希望对你有一定的参考价值。

public static DateTime EasterSunday(int year)
{
    int day = 0;
    int month = 0;

    int g = year % 19;
    int c = year / 100;
    int h = (c - (int)(c / 4) - (int)((8 * c + 13) / 25) + 19 * g + 15) % 30;
    int i = h - (int)(h / 28) * (1 - (int)(h / 28) * (int)(29 / (h + 1)) * (int)((21 - g) / 11));

    day   = i - ((year + (int)(year / 4) + i + 2 - c + (int)(c / 4)) % 7) + 28;
    month = 3;

    if (day > 31)
    {
        month++;
        day -= 31;
    }

    return new DateTime(year, month, day);
}

以上是关于csharp 来自http://stackoverflow.com/questions/2510383/how-can-i-calculate-what-date-good-friday-falls-的主要内容,如果未能解决你的问题,请参考以下文章

csharp 来自csvj的getFrameworkVersion在tfvc上

csharp 来自http://www.codemag.com/Article/1312081

csharp 来自http://www.codemag.com/Article/1312081

csharp 来自http://www.codemag.com/Article/1312081

csharp 来自http://www.codemag.com/Article/1312081

csharp HMACSHA256来自http://ideone.com/JdpeL