in reply to Re: Template Toolkit Formatting Data Question (sprintf and commafy)
in thread Template Toolkit Formatting Data Question (sprintf and commafy)

I opted to see if I could expand the MACRO provided in the POD - worked well enough for my need but ymmv:
[%- MACRO commify(n) GET n.replace('\.\d+$','').chunk(-3).join(',') _ +n.replace('^\d+', '') %]
  • Comment on Re^2: Template Toolkit Formatting Data Question (sprintf and commafy)
  • Download Code