I'm trying to do a global that checks if a date is in the future or not and returns true or false accordingly. For some reason, it's not working. Any advice would be greatly appreciated:
#-------------------------------------------------------------------
# Check if a date is "current" (either today or in the future).
my($date) = @_;
my $today = GT::Date::date_get();
return GT::Date::date_is_greater($date, $today);
}
The way I'm calling it in my templates is:
<%if Dbsql::Custom::date_is_current($date_field)%>
Display the record
<%endif%>
Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Code:
sub date_is_current { #-------------------------------------------------------------------
# Check if a date is "current" (either today or in the future).
my($date) = @_;
my $today = GT::Date::date_get();
return GT::Date::date_is_greater($date, $today);
}
The way I'm calling it in my templates is:
<%if Dbsql::Custom::date_is_current($date_field)%>
Display the record
<%endif%>
Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund