ANSWERS: 7
  • The basis of nearly all the algorithms to calculate the day of the week is: 1. Use arithmetic modulo 7 to add the number of days elapsed since the start of a known period (usually in practice a century). If we number the days of the week from 0 to 6 the result is some modulo value; if we use the range from 1 to 7, then 7 replaces 0. 2. To look up or calculate using a known rule what day the given century started on. 3. To look up or calculate what day the given year in that century started on. 4. To look up or calculate what day the given month in that year in that century started on. 5. To then add on the day of the month - this of course being the days elapsed since the month started. Put simply, using arithmetic modulo 7 means ignoring multiples of 7 during calculations. Thus we can treat 7 as 0, 8 as 1, 9 as 2, 18 as 4 and so on; the interpretation of this being that if we signify Sunday as day 0, then 7 days later (i.e. day 7) is also a Sunday, and day 18 will be the same as day 4, which is a Thursday since this falls 4 days after Sunday. Some algorithms do all the additions first and then cast out sevens whereas others cast them out at each step. Either way is quite permissible; the former is better when using calculators and in computer algorithms, the latter for mental calculation (it is quite possible to do all the calculations in one's head with a little practice). http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week
  • There's also functions you can use in software like Excel in case you just need the answer, not an algorithm and program.
  • Find an Idiot Savant...RAINMAN!
  • Most greeting card and calendar software will do that for you. Just type in the year and month you want and it will create a calendar page. I did that with mine, and created calendars for 1918 through 1927 for a novel I was writing.
  • You could just try here!!http://scphillips.com/units/dayform.html
  • Use Zeller's congruence, which says that if J is the number of the century [i.e. the year / 100], K the year within the century [i.e. the year % 100], m the month, q the day of the month, h the day of the week [where 1 is Sunday]; and if January and February are taken as months 13 and 14 of the previous year [affecting both J and K]; then h for the Gregorian calendar is the remainder when the sum q + 26(m + 1) / 10 + K + K/4 + J/4 - 2J is divided by 7, and where all intermediate remainders are discarded. The translation into C is straightforward: h = (q + 26 * (m + 1) / 10 + K + K/4 + J/4 + 5*J) % 7 (where we use +5*J instead of -2*J to make sure that both operands of the modulus operator % are positive; this bias totalling 7*J will obviously not change the final value of h, modulo 7).
  • Yeah, i'ts called 'looking in the calendar'

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy