On Sat, Apr 11, 2009 at 1:32 PM, Kelly Thompson <[email protected]>wrote:

> In the line: newDate = "${dateArray.0}${dateArray.1}${weekDys.0 -1}";
> I have tried.
>
> newDate = "${dateArray.0}${dateArray.1}"+"(${weekDys.0} -1)";
>
> newDate = "${dateArray.0}${dateArray.1}${${weekDys.0} -1}";
>
> newDate = "${dateArray.0}${dateArray.1}(${weekDys.0} -1)";
>
>
> AND!!
>
> newDate = "${dateArray.0}${dateArray.1}$weekDys.0 -1";
>
> To no avail!!
>
> I either get: unexpected token (-1)
>
> Or the date with -1 added to the end, or even sometimes with the last part
> missing.
>

Use the concatenation operator instead of a double-quoted string.  You can
concatenate arbitrary expressions:

newDate = dateArray.0 _ dateArray.1 _ (weekDys.0 - 1);


--Sean
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to