_ __/|
`O.o'
+-------- =(_X_)= -------------+
| Internet U Email |
| jeff....@multisystem.com |
> Can any of you puzzle experts think of any way to figure out what day that
> Thanksgiving comes on for any specified year?
isn't it the next-to-last Thursday in November?
or was it the third Thursday.
one of those, i think.
it's definitely a Thursday, though.
-- rob
----------
Well, the knee-jerk answer is "Thursday" in case that's what you were
trolling for (or away from).
The whole answer, from the dictionary, is: 4th Thursday in November (in the
USA), 2nd Monday in October (in Canada).
I'm still trying to figure what the "puzzle" was meant to be here.
For year N...
SPOILER
...it's Thursday.
Oh, you meant which DATE!
byron elbows
br...@isi.edu
http://info.broker.isi.edu/brian/
* now with 3D action for Netscape users!
byron elbows' two rules of human nature:
* No one is as weird as they think they are.
* Everyone is weirder than others think they are.
I wrote:
> Oh, you meant which DATE!
>
Take the year number y. Divide y-1900 by 4 to get q remainder r.
Divide y+q+4 by 7 to get f remainder g. If g is less than 5, subtract
g from 5 to get d. Otherwise, subtract g from 12 to get d. Thanksgiving
comes on d+21.
For example, the current year is 1995. Divide 95 by 4 to get 23 remainder
3. Divide 122 by 7 to get 17 remainder 3. Subtract 3 from 5 to get 2.
Thanksgiving comes on 23 November 1995.
I forgot to mention that this only works until the year 2100.
Look at a calendar? :-)
> : Can any of you puzzle experts think of any way to figure out what day that
> : Thanksgiving comes on for any specified year?
>
>
> ----------
>
> Well, the knee-jerk answer is "Thursday" in case that's what you were
> trolling for (or away from).
>
> The whole answer, from the dictionary, is: 4th Thursday in November (in the
> USA), 2nd Monday in October (in Canada).
>
> I'm still trying to figure what the "puzzle" was meant to be here.
Maybe a function "US" which maps from {years} to {22,23,24,25,26,27,28},
the possible dates in November on which Thanksgiving may fall in the US
(trusting your dictionary to have the correct definition of
Thanksgiving). Similarly for Canada, of course.
mag
--
Tom Magliery ** NCSA ** 605 E Springfield ** Champaign IL 61820 ** USA
Duh. Easier to do the following:
Take the year number y. Multiply y-1900 by 5, then divide by 4, then
subtract 1. Take the remainder modulo 7. Subtract from 28. That's
the date that Thanksgiving comes on.
In C:
offset = year-1900;
date = 28-(offset*5/4-1)%7
For instance:
95*5/4 = 118
117/7 = 16 remainder 5
Thanksgiving comes on 23 November.
byron elbows
br...@isi.edu
http://info.broker.isi.edu/brian/
* now with 3D action for Netscape 1.1+ users!
Actually, it's the fourth Thursday. It used to be the last Thursday, but that
changed under FDR. It's the key to one of Azimov's Black Widow stories.
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Brian Gordon -->bri...@netcom.com<-- bgo...@isi.com |
+ AOL: BGordon eWorld: BrianGordon CompuServe: 70243,3012 +
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>Can any of you puzzle experts think of any way to figure out what day that
>Thanksgiving comes on for any specified year?
>---
Are you referring to American Thanksgiving (Nov 23rd) or Canadian (Oct
9th).
ed_p...@mindlink.bc.ca
Vancouver, British Columbia, Canada - its SuperNatural