Florin Iucha wrote: > On Wed, Dec 05, 2007 at 09:15:35PM -0600, Mike Miller wrote: > >> My brother's birthday is on November 22. Once every 7 years, on average, >> his birthday falls on Thanksgiving. I was curious about when exactly that >> would occur in the future so I did something like this in the bash shell >> on a GNU system: >> >> for year in $(seq 2008 2060) ; do date -d 11/22/$year | grep Thu ; done >> > > Thu Nov 22 00:00:00 CST 2012 > Thu Nov 22 00:00:00 CST 2018 > Thu Nov 22 00:00:00 CST 2029 > Thu Nov 22 00:00:00 CST 2035 > Thu Nov 22 00:00:00 CST 2040 > Thu Nov 22 00:00:00 CST 2046 > Thu Nov 22 00:00:00 CST 2057 > > >> And if you try it, you'll see what happens -- it fails starting in 2038. >> > > Works fine here. > > >> It also fails if you go back before 1970. >> > > $ for year in $(seq 1776 2060) ; do date -d 11/22/$year | grep Thu> > Thu Nov 22 00:00:00 CST 1781 > Thu Nov 22 00:00:00 CST 1787 > Thu Nov 22 00:00:00 CST 1792 > Thu Nov 22 00:00:00 CST 1798 > Thu Nov 22 00:00:00 CST 1804 > Thu Nov 22 00:00:00 CST 1810 > Thu Nov 22 00:00:00 CST 1821 > Thu Nov 22 00:00:00 CST 1827 > Thu Nov 22 00:00:00 CST 1832 > Thu Nov 22 00:00:00 CST 1838 > Thu Nov 22 00:00:00 CST 1849 > Thu Nov 22 00:00:00 CST 1855 > Thu Nov 22 00:00:00 CST 1860 > Thu Nov 22 00:00:00 CST 1866 > Thu Nov 22 00:00:00 CST 1877 > > No it doesn't fail! > > >> By the way, this method works for any range of years: >> >> for year in $(seq 1960 2060) ; do cal 11 $year | egrep -B5 '^18 19 20 21 22' | grep November ; done >> >> That is, it shows you every November for the given range of years where >> the 22nd of the month falls on a Thursday. Thanksgiving wasn't on the >> fourth Thursday of November until the 1930s -- before that it was on the >> final Thursday of the month and therefore would always have been on 11/29 >> instead of on 11/22. >> >> Funny what you can do easily with these GNU programs, eh? >> > > Mike, > > Tell the U admins to install a more modern Linux distro. And get > 32 more bits and sprinkle them above the CPU - it works wonders 8^) > Just make sure they don't fall onto the motherboard, as they might > short something... > > Cheers, > florin > > > ------------------------------------------------------------------------ > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list > He must be using a 32 bit Linux distro. All of the UMN ITLabs machines are 64 bit Ubuntu or SunOS with very modern hardware. Even the monitors are >20" LCDs. I estimate the ones in the Lind lab are 32" which are nice for programming or debugging when you have to look at a lot of code at once.