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 12787 Jan 18, 2003, 1:15 PM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12667 Jan 20, 2003, 12:23 AM
Post Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12619 Jan 20, 2003, 6:03 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12626 Jan 20, 2003, 7:07 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12627 Jan 20, 2003, 7:24 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12669 Jan 20, 2003, 7:55 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12656 Jan 20, 2003, 8:04 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
jaspercram 12640 Jan 20, 2003, 8:24 AM
Post Re: [jaspercram] Question about GT::Date::date_is_greater
hennagaijin 12628 Jan 20, 2003, 8:26 AM
Thread Re: [jaspercram] Question about GT::Date::date_is_greater
Paul 12628 Jan 20, 2003, 8:33 AM
Thread Re: [Paul] Question about GT::Date::date_is_greater
hennagaijin 12614 Jan 20, 2003, 8:35 AM
Thread Re: [hennagaijin] Question about GT::Date::date_is_greater
assombracao 11653 Dec 15, 2004, 11:24 AM
Thread Re: [assombracao] Question about GT::Date::date_is_greater
604 11665 Dec 16, 2004, 4:08 PM
Post Re: [TheStone] Question about GT::Date::date_is_greater
assombracao 11626 Dec 17, 2004, 5:36 AM