Help on the doomsday equation/birthday equation

  • Thread starter Thread starter lilxchristina
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around the doomsday equation, which is used to calculate the day of the week for any given date. Participants are examining the components of the equation, particularly the significance of certain terms related to leap years.

Discussion Character

  • Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • The original poster attempts to understand the necessity of the terms [y/4], [y/100], and [y/400] in the equation. Some participants question whether removing these terms affects the accuracy of the formula.

Discussion Status

The conversation is ongoing, with some participants suggesting that the equation's accuracy is influenced by leap years. There is no explicit consensus on the resolution of the issues raised, but the discussion is exploring the implications of these components.

Contextual Notes

lilxchristina
Messages
4
Reaction score
0
here's the equation


d = date of the month
m = number of the month in the year
y = year


W = d + 2m + [3(m+1)/5] + y + [y/4] - [y/100] + [y/400] + 2

afterwards, divide w by 7, and the remainder is the day of the week, according to:

1 - sunday
2 - monday
3 - tuesday
4 - wednesday
5 - thursday
6 - friday
0 - saturday


now, i totally understand the equation, and it works. but i just don't understand what the significance of the [y/4] [y/100] and [y/400] is.
why is it needed in the equation? :frown:
 
Physics news on Phys.org
Take them out. Does the formula work then?
 
no, the formula is off. when i tried it with today's date without them, it turned out 1 day behind.
 
Think about leap years.
 
I tried this equation for Monday, January 29 and it did not work. It also did not work for Tuesday, January 30 or Monday, January 01. It always comes up one day behind. Does it stop working at some year?
 
Think about leap years!
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
11K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K