[ic] Time Adjust and Tag Time (Perl)

Bruno Cantieni interchange-users@icdevgroup.org
Sun Jun 9 09:41:01 2002


----- Original Message ----- 
From: "Mike Heins" <mike@valuemedia.com>
To: <interchange-users@icdevgroup.org>
Sent: June 8, 2002 2:48 PM
Subject: Re: [ic] Time Adjust and Tag Time (Perl)


> Quoting Bruno Cantieni (bruno@digi-land.com):
> > I have scrounged around for documentation on $Tag->time($locale,
> > $ATTRHASH, $BODY), but can not find how to pass an "adjust"
> > (equivalent to [time adjust=n]FormatSting[/time]. Taking a guess by
> > looking at $Tag->time( '', { format => '%Y' }, '%Y' ) used in the
> > credit card expiry year dropdown and trying $Tag->time( '', { adjust
> > => '$x' }, '%A, %B %d, %Y' ) does not appear to work.
> 
> A variable inside single quotes will not be evaluated. Your call looks
> correct otherwise.
> 
> -- 
> Mike Heins
> Perusion -- Expert Interchange Consulting
> phone +1.513.523.7621      <mike@perusion.com>
> 
> Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

Thanks Mike;
Actually, I tried it without quotes too and it did work but in my haste I used $x instead of $y.
Of course. $x did not advance the date (quotes or no quotes :)), making me think it wasn't working.

# now build an array of dates

for ($x=0; $x <= $days_net; $x++){

$y = $x*24;

$date_slice = $Tag->time( '', { adjust => $y }, '%A, %B %d, %Y' );

push (@dates, $date_slice);

}

sheepishly,
Bruno Cantieni

###########################################
Bruno Cantieni
Digital Landscape - Cyboretum.com
Web Applications * Web Hosting * e-Commerce
http://www.digi-land.com
http://www.cyboretum.com
bruno@digi-land.com
Phone/Fax: 905.668.2255