Re: [Templates] Can't comparing strings (strings are treated as numbers)
[prev]
[thread]
[next]
[Date index for 2004/12/23]
This is a multi-part message in MIME format.
--------------050203080203020704020007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Well that isnt a string per-se,
its a date...
pirint "good\n" if ( '2004-11-23' < '2004-11-26' );
doesnt print good either...
use the date plugin in particular say
the interface to Date::Calc
and turn the dates into unix epochs that you can compare
Oleg Burlaca wrote:
>Hi!
>
>How can I compare two strings in TT ?
>
>
>--------------------
>the following tmpl doesn't show 'Good':
>
>[% IF '2004-11-23' < '2004-11-26' %]
>Good
>[% END %]
>-------------------
>
>how to use 'lt' ?
>
>Thanks
>
>
>_______________________________________________
>templates mailing list
>templates@xxxxxxxxxxxxxxxx.xxx
>http://lists.template-toolkit.org/mailman/listinfo/templates
>
>
>
--------------050203080203020704020007
Content-Type: text/x-vcard; charset=utf-8;
name="sean.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sean.vcf"
begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;internet:sean@xxxxxxxxxx.xxx
title:Tech Guru
tel;work:718-388-5424
x-mozilla-html:FALSE
version:2.1
end:vcard
--------------050203080203020704020007--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] Can't comparing strings (strings are treated as numbers)
Sean T Allen 17:42 on 23 Dec 2004
|