Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Question about GT::Date::date_is_greater

Quote Reply
Question about GT::Date::date_is_greater
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:

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
Subject Author Views Date
Thread Question about GT::Date::date_is_greater hennagaijin 12592 Jan 18, 2003, 1:15 PM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12474 Jan 20, 2003, 12:23 AM
Post Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12426 Jan 20, 2003, 6:03 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12432 Jan 20, 2003, 7:07 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12434 Jan 20, 2003, 7:24 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12476 Jan 20, 2003, 7:55 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12463 Jan 20, 2003, 8:04 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12447 Jan 20, 2003, 8:24 AM
Post Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12435 Jan 20, 2003, 8:26 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
Paul 12435 Jan 20, 2003, 8:33 AM
Thread Re: [Paul] Question about GT::Date::date_is_greater
hennagaijin 12421 Jan 20, 2003, 8:35 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
assombracao 11459 Dec 15, 2004, 11:24 AM
Thread Re: [assombracao] Question about GT::Date::date_is_greater
604 11472 Dec 16, 2004, 4:08 PM
Post Re: [TheStone] Question about GT::Date::date_is_greater
assombracao 11433 Dec 17, 2004, 5:36 AM