[Templates] Putting commas in money values

[prev] [thread] [next] [Date index for 2004/08/19]

From: Buddy Burden
Subject: [Templates] Putting commas in money values
Date: 21:16 on 19 Aug 2004
Guys,

Okay, the canonical MACRO example goes something like:

	[% MACRO commify(n) GET n.chunk(-3).join(',') %]

Simple enough.  But what if you have decimal places on the end?  I mean, 
I know I can do this the hard way, but I keep feeling like I'm missing 
something.  Is there some easy way, or maybe existing 
plugin/filter/predefined macro somewhere?  I'm sure it's a problem 
others have faced before me.

TIA.


		-- Buddy

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Putting commas in money values
Buddy Burden 21:16 on 19 Aug 2004

Re: [Templates] Putting commas in money values
Mark Fowler 09:22 on 20 Aug 2004

Re: [Templates] Putting commas in money values
Buddy Burden 14:29 on 20 Aug 2004

Re: [Templates] Putting commas in money values
Chris Ochs 16:24 on 23 Aug 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52