-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoomsday.txt
70 lines (56 loc) · 1.47 KB
/
doomsday.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Major Doomsdays:
4/4, 6/6, 8/8, 10/10, 12/12, 9/5, 5/9, 7/11, 11/7
3/1, or 4/1 for leap year
28/2, or 29/2 for leap year
14th mrach/ pi day
doomsday for years:
2000:Tue
2001:Wed
2002:Thrs
2003:Fri
2004:Sun
leap year go forward an extra day
*Calculation to find doomsday of a particular year = doomsday of refrenced year + (choosen year - refrenced year) + (choosen year - refrenced year)/4{ignore fractions}
Day and their given number
sunday = 0
monday = 1
tuesday = 2
wednesday = 3
thursday = 4
friday = 5
saturday = 6
century doomsdays
1700: sunday --
1800: friday -- same pattern in following years
1900: wednesday --
2000: tuesday --
2100: sunday
2200: friday
2300: wednesday
2400: tuesday
shortcurt for years: all these are zero
0, 28, 56, 84
shortcut:( dont understnad thsi part yet)
0: 0
12: 1
24: 2
36: 3
48: 4
60: 5
72: 6
84: 7
96: 8
ONE EXAMPLE:
18th june 1976
FIrst part:
1976: 72 is 6(from line 47) + 4(from 76-72) + 1(leap year from 4/4) +
3(from the century of 19 and doomsday for 1900 is wed(from line 29)
and wed is 3(from line 21))
= 14 = 0(since 14 is a multiple of 7)
thus doomsday for 1976 is sunday(from line 18)
now for 18th june:
closest special date to 18th june is 6/6.
now since 6 + 12 = 18(dates)
0+12(days) = will be the day on 18th june
0+12 = 0+5(from 12-7) = 5 which is friday
thsu 18th june 1976 is friday