Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • 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 []!

    • 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;


      Thu Jun  7