Week for calculation of the Gregorian calendar date

Source: Internet
Author: User

Weekly computing availableZeller Formula(Applicable only after October 15, 1582 ):

W = Y + [Y/4] + [C/4]-2C + [26 (m + 1)/10] + D-1

The meanings of the symbols in the formula are as follows:
C: Century (double digits of the year );
Y: year (two digits below the year level );
M: Month (M is greater than or equal to 3, less than or equal to 14, that is, in the caile formula, the 1 and February of a year are regarded as the 13 and 14 months of the previous year.
For example, January 1, 2005 is regarded as the 13-month-1 day of 2004 );
D: Day;
[] Indicates an integer.
W: Week; W: 7: 0-Sunday, 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday,
5-Friday, 6-Saturday

Take February 14, 2005 as an example: c = 20, y = 4, M = 14, D = 14
W = 4 + [4/4] + [20/4]-2*20 + [26*(14 + 1)/10] + 14-1
= 4 + 1 + 5-40 + 39 + 14-1
= 22 (divided by more than 7 1)
Therefore, July 22, February 14, 2005 is Monday.
The reason why Zeller's formula was only suitable for the situation after October 15, 1582 was that the Pope gregali 13th organized a group of astronomers in 1582, according to the computation of the godnex, made changes to the Confucianism. The revocation will be announced within 10 days from January 1, October 5-14, 1582, following January 1, October 4 as January 1, October 15.
Later, people referred to this new calendar as the "Gregorian Calendar", that is, the calendar commonly used in the world today, or the Gregorian calendar.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.