Hi:
My site is a pretty modified Links- I show cartoon production data in a manner like IMDB, rather than Links like Yahoo. In any case, sometimes I have info in the database for FUTURE productions (and Add_Date, for me, is the date of cartoon release). So, what I want to do is have a global check the date, and if it is in the future, return a positive, so I can add a note that this cartoon is currently in production, and information is liable to change. I wrote this:
sub {
use GT::Date qw/:all/;
my ($rec) = @_;
my $prod;
my $ad = $rec->{'Add_Date'};
Links::init_date();
my $today = date_get (time + (7 * 86400));
if (date_is_smaller($today,$ad)) {
$prod = 'Yes';
}
return $prod;
}
but it never returns anything. Any ideas?
Thanks!dave
Big Cartoon DataBase
Big Comic Book DataBase
My site is a pretty modified Links- I show cartoon production data in a manner like IMDB, rather than Links like Yahoo. In any case, sometimes I have info in the database for FUTURE productions (and Add_Date, for me, is the date of cartoon release). So, what I want to do is have a global check the date, and if it is in the future, return a positive, so I can add a note that this cartoon is currently in production, and information is liable to change. I wrote this:
Quote:
sub {
use GT::Date qw/:all/;
my ($rec) = @_;
my $prod;
my $ad = $rec->{'Add_Date'};
Links::init_date();
my $today = date_get (time + (7 * 86400));
if (date_is_smaller($today,$ad)) {
$prod = 'Yes';
}
return $prod;
}
but it never returns anything. Any ideas?
Thanks!
Big Cartoon DataBase
Big Comic Book DataBase