[Templates] Re: what's the replacement of "gt" in TT?
fayland
fayland@gmail.com
Sat, 12 Aug 2006 09:05:16 +0000
fayland wrote:
> quick question:
> I use perl like:
>
> if ('2006-08-12 06:32:38' gt '2006-08-11 16:43:41') {
> print 'ok';
> } else {
> print 'no';
> }
>
> It prints "ok".
> but TT seems don't has "gt"? I write something like:
>
> [% IF '2006-08-12 06:32:38' > '2006-08-11 16:51:08' %]
> ok
> [% ELSE %]
> no
> [% END %]
>
> It prints "no".
>
> Thanks.
>
It seems that
http://search.cpan.org/~tanimoto/Template-Plugin-String-Compare-0.01/lib/Template/Plugin/String/Compare.pm
can help me out.
Thanks any way.
--
Fayland Lam // http://www.fayland.org/