This morning I put on a watch that I hadn't worn for a long time. The quartz movement was active but the date said "7" when it should have said "20".
Quiz: Assuming that the date was correct when I last wore the watch, when did I last wear the watch? Answer to the closest month. The watch has a cycle of 31 days and I bought it in the beginning of the year 2000.
For the horologists amongst you it is a Philip Watch Imakos.
Presuming you cared about the date when you wore it and didn't just let it drift, the answer is April or March, 2001.
Since the watch goes through a 31-day cycle, it loses 7 days on a non-leap year (two in February, and one each in April, June, September, and November). Since this is March 2003, it's lost 2 days this year, 7 days in 2002, and 4 days in 2001, which puts it at April or March.
This was fun. If you listen to NPR, you may want to submit it as the Car Talk puzzler!
Re:Warning, spoiler
jmcnamara on 2003-03-21T08:56:29
Very close.:-) It does lose 7 days in a non-leap year but that includes 3 days in February and not 2. So it lost 3 days this year. Thus, the date would have been correct in May and June 2001.
I also asked this question on PerlMonks and Bart Lateur came up with the following, rather nice, solution:
#!/usr/bin/perl -wl
my $time = time;
while($time > 0) {
print scalar localtime($time) if (localtime($time))[3] == 7;
} continue {
$time -= 31*24*60*60;
}
__END__
Prints:
Thu Jun 7 13:50:50 2001
Mon May 7 13:50:50 2001
Fri Feb 7 12:50:50 1997
Tue Jan 7 12:50:50 1997
Sat Dec 7 12:50:50 1996
Tue Apr 7 13:50:50 1992
Sat Mar 7 12:50:50 1992
Mon Sep 7 13:50:50 1987
Fri Aug 7 13:50:50 1987
Tue Jul 7 13:50:50 1987
Wed Jun 7 13:50:50 1978
Sun May 7 13:50:50 1978
Thu Feb 7 12:50:50 1974
Mon Jan 7 12:50:50 1974
Fri Dec 7 12:50:50 1973Re:Warning, spoiler
VSarkiss on 2003-03-21T20:25:59
Damn, you mean I was off by one? When am I going to learn?
;-)