A community for students.
Here's the question you clicked on:
 0 viewing
Daeruin
 2 years ago
I'm looking at homework 1, optional exercise 1 (Zeller's algorithm). The instructions have a contradiction when the month is Jan or Feb. At one point it says to subtract 1 from C, then it says to use the preceding year. They are not the sameit makes a difference when the year ends in 0, as in the year 2000. If you use the preceding year, year = 20001 = 1999; C = 99. But if you subtract 1 from C, year = 2000; C = 01 = 1. Any idea which is meant?
Daeruin
 2 years ago
I'm looking at homework 1, optional exercise 1 (Zeller's algorithm). The instructions have a contradiction when the month is Jan or Feb. At one point it says to subtract 1 from C, then it says to use the preceding year. They are not the sameit makes a difference when the year ends in 0, as in the year 2000. If you use the preceding year, year = 20001 = 1999; C = 99. But if you subtract 1 from C, year = 2000; C = 01 = 1. Any idea which is meant?

This Question is Closed

Daeruin
 2 years ago
Best ResponseYou've already chosen the best response.0I think I figured this out by looking online. Other explanations of Zeller's algorithm clarified that you actually do use the preceding yearso subtract 1 from the year, then calculate C. One reason I was asking is because I kept getting incorrect output for the years 1000 and 1100 and thought it might have to do with how I was calculating C. I found this explanation online: "This uses the Gregorian calendar, which is our current standard. There are other calendars in use in the world. As the Gregorian calendar was devised in 1582, fixing the cumulative errors of the preceding Julian calendar, it is not clear that Zeller's algorithm will work properly for dates before 1582."
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.