My apologies about being so dense with the recent discussion about -gt and -lt date searches. I had only tried it on my home computer and it worked fine. Tonight I tried it on my website and it didn't work at all.
The previous code I gave you for finding dates works just fine. The problem is that get_date needs to be changed.
The changes are in bold print:
unless ($time) { $time = time(); }
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) = localtime($time);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day-$months[$mon]-$year";
Again, I apologize. I should have tried it out on my site before I said anything here.
(A little bit later) This only applies if you're using a version before 2.04 (as I have been using on my site). Version 2.04 has this in it, in better code than mine, but basically the same thing.
------------------
JPD
[This message has been edited by JPDeni (edited February 12, 1999).]
The previous code I gave you for finding dates works just fine. The problem is that get_date needs to be changed.
The changes are in bold print:
Code:
my($time) = $_[0]; unless ($time) { $time = time(); }
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) = localtime($time);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day-$months[$mon]-$year";
Again, I apologize. I should have tried it out on my site before I said anything here.
(A little bit later) This only applies if you're using a version before 2.04 (as I have been using on my site). Version 2.04 has this in it, in better code than mine, but basically the same thing.
------------------
JPD
[This message has been edited by JPDeni (edited February 12, 1999).]