Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Zeller s congruence ( source:Click _ here _ for _ more ) is an algorithm devised by Christian Zeller to calculate the day of the

Zellers congruence (source:Click_here_for_more) is an algorithm devised by Christian Zeller to calculate
the day of the week for any calendar date. For todays Gregorian calendar, Zellers congruence is
G =(q +(m +1)13
5+ U + U
4+ V
42 V ) mod 7(1)
where G is the day of the week (0 means Saturday, 1 means Sunday, 2 means Monday, ...), q is the day of
the month (1<= q <=31), m is the month (1<= m <=12), and y is the year of the calendar date (1582<= y <=2099).
Further, the above equation distinguishes V as the century (that is, V = y
100), and U as the year of
the century (that is, U = y mod 100).
Finally, there is an exception in Zellers congruence for the months of January and February which need to
be counted as month 13 and 14, respectively, of the previous year. Thus, if m =1 or m =2, then we need to
add 12 months to the value of m, and subtract 1 year from y before we feed the values into the above equation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions