Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Global that compares Dates

Quote Reply
Global that compares Dates
Hi:



I have been using this plugin (in ver 2.0.5) fine, but for some reason, it does not make the transition to 2.1.1.1. It does not crash or make a fatal error, but it never returns a "1" when it should. (It should return "0" unless the Add-Date is one week from today, then reutrn "1". Sounds silly, I know, but it works for me!)



Any ideas?



Code:



sub {
use GT::Date qw/:all/;
no strict;
my ($rec) = @_;
my $prod = 0;
my $ad = $rec->{'Add_Date'};
Links::init_date();
my $today = date_get (time + (7 * 86400));
if (date_is_smaller($today,$ad)) {
$prod = 1;
}
return $prod;
}


THANKS!
dave

Big Cartoon DataBase
Big Comic Book DataBase