From: Clinton Pierce <cpierce1@ford.com>
To: Andrew Gierth <andrewg@microlise.co.uk>
Subject: Re: Friday 13th, try it yourself (was Language Wars..)
Date: 1996/09/20
Date: 1996-09-20T00:00:00+00:00 [thread overview]
Message-ID: <3242D1EB.3F54@ford.com> (raw)
In-Reply-To: 51bv60$8d@pheidippides.axion.bt.co.uk
Andrew Gierth wrote:
>
> >>>>> "Norman" == Norman H Cohen <ncohen@watson.ibm.com> writes:
>
> > Andrew Gierth wrote:
> >> The 13th day of the month is more often Friday than any other day
> >> of the week.
> Norman> I apologize for the off-topic posting (especially when it is
> Norman> cross-posted to so many newsgroups, and thus off so many
> Norman> topics at once), but it should be pointed out, before this
> Norman> becomes an urban legend, that this "factoid" is patently
> Norman> false!
> Oh dear. I don't have alt.folklore.urban on my server, or I might take
> this discussion there; in the absence of any obvious other place to
> direct followups to, we will have to stay off-topic for the time
> being. Email might be a good move...
>
> Skeptics are invited to write a program to do the calculation for
> themselves.
>
Let's get back on Topic, for comp.lang.perl at least.
See for yourself if the "Friday the 13th" thing is just a UL. If you trust
UNIX's 'cal' program, and that it does the Right Thing with Leap Years, the
Gregorian/Julian switch etc..etc... This Perl script will show you the Truth:
#!/usr/bin/perl4
foreach $year (1066...1996) {
$FRIDAYS=`cal $year | cut -c20-24,50-53 | grep [0-9]`;
while($FRIDAYS=~/\d+/g) {
$DAYOFMONTH{$&}++;
}
}
foreach(1..31) {
print "Day of month: $_ Freq: $DAYOFMONTH{$_}\n";
}
Just make sure that your vendor's implementation of 'cal' puts Fridays in the
specified columns. Use 'cal 1996 | cut -c20-24,50-53' and make sure you just
get Fridays as output.
--
----------------------------------------------------------------------o------
Clinton A. Pierce | "If you rush a Miracle Man | \ / \ /
cpierce1@ford.com | you get rotten miracles." | \ G /
DCI, Inc. on loan to Ford. | --Miracle Max, The Princess Bride | / \ / \
------------------------------------------------------------------Freemason--
Geek Code: GCM/GCSd-(++)s+:+a-C++UA++++$UIS+++$UL+++P++++L++E---W++N++w---O
(Revised!) t++(+++)5+X+R-tv-b+++DI++++G++e+>++h----r+++y+++(--)>y*
I'll be a Speaking Geek at LISA '96. Catch me on Wed AM, 11:30. Topic: Igor
next prev parent reply other threads:[~1996-09-20 0:00 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-13 0:00 language wars (results 13 September) last posting Roy Gardiner
1996-09-13 0:00 ` William Clodius
1996-09-13 0:00 ` Peter Seebach
1996-09-21 0:00 ` Robert Dewar
1996-09-21 0:00 ` Robert Dewar
1996-09-16 0:00 ` Robert Fahey
1996-09-18 0:00 ` James Giles
1996-09-18 0:00 ` Andrew Gierth
1996-09-18 0:00 ` Luke Chao
1996-09-18 0:00 ` James Giles
1996-09-18 0:00 ` Norman H. Cohen
1996-09-19 0:00 ` Andrew Gierth
1996-09-19 0:00 ` Daniel J. Long
1996-09-21 0:00 ` Ken Pizzini
1996-09-24 0:00 ` Art Schwarz
1996-09-26 0:00 ` Matthew D. Healy
1996-09-29 0:00 ` Randy MacDonald
1996-10-03 0:00 ` galina.kasminskaya
1996-10-03 0:00 ` Dave Tholen
1996-09-26 0:00 ` Ken Pizzini
1996-09-29 0:00 ` Paul Gilmartin
1996-09-21 0:00 ` Ken Pizzini
1996-09-19 0:00 ` Norman H. Cohen
1996-09-20 0:00 ` John Girash
1996-09-20 0:00 ` John Girash
1996-09-20 0:00 ` Clinton Pierce [this message]
1996-09-21 0:00 ` Friday 13th, try it yourself (was Language Wars..) Russell Mosemann
1996-09-21 0:00 ` Russell Mosemann
1996-09-25 0:00 ` Ken Pizzini
1996-09-25 0:00 ` Results of my test: Re: Friday 13th, try it yourself Lee Crites
1996-09-25 0:00 ` William Clodius
1996-09-27 0:00 ` Dik T. Winter
[not found] ` <52qpqt$1b3l@ilx018.iil.intel.com>
1996-10-02 0:00 ` Dik T. Winter
1996-10-02 0:00 ` Ken Pizzini
1996-09-26 0:00 ` Dr John Stockton
1996-09-26 0:00 ` Dr John Stockton
1996-09-26 0:00 ` Lee Crites
1996-09-26 0:00 ` Adam Beneschan
1996-09-27 0:00 ` Glen Clark
1996-09-26 0:00 ` Daan Sandee
1996-09-26 0:00 ` Jeff Drummond
1996-09-30 0:00 ` Ray Dunn
1996-09-26 0:00 ` John Winters
1996-09-27 0:00 ` CHI Research, Inc.
1996-09-27 0:00 ` Lee Crites
1996-09-28 0:00 ` John Winters
1996-09-30 0:00 ` Adam Beneschan
1996-10-01 0:00 ` Mike McCarty
[not found] ` <199609302101.JAA04610@kauri.vuw.ac.nz>
1996-09-30 0:00 ` Lee Crites
1996-09-25 0:00 ` Friday 13th, try it yourself (was Language Wars..) Barrie Walker
1996-09-26 0:00 ` Jim Shapiro
1996-09-23 0:00 ` Matthew D. Healy
1996-09-23 0:00 ` Dik T. Winter
1996-09-25 0:00 ` Paul Gilmartin
1996-09-22 0:00 ` Dr John Stockton
1996-09-23 0:00 ` Dr John Stockton
1996-09-23 0:00 ` Randy MacDonald
1996-09-23 0:00 ` Dik T. Winter
1996-09-25 0:00 ` John Harper
1996-09-25 0:00 ` jupiter
1996-09-24 0:00 ` language wars (results 13 September) last posting Andrew Gierth
1996-09-24 0:00 ` Art Schwarz
-- strict thread matches above, loose matches on Subject: below --
1996-09-25 0:00 Friday 13th, try it yourself (was Language Wars..) Barrie Walker
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox