On Tue, 5 Jul 2005, Juerd wrote:
No. Humans don't USE numbers for week days! So beginning at 1 makes no
sense, except for humans who like creating lists like (undef, <Sunday
Monday ...>). In fact, I would prefer <Saturday Sunday Monday ...> to
not having any 0 :)
This should be separated into day() and day_name(). It's hardly obvious
that day() should return a string, much less a bit of English!
As for 0 vs 1 as the index, I think this is a bit of a red herring. If
you're constantly using this as an array index you're operating at too low
a level (IMO). If all your programs start with:
my @DayNames = qw( Sunday Monday Tuesday ... );
I think you have a bigger problem than simply adjusting for a 1-indexed
day number ;)
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/