Tanks! Work great! -----Message d'origine----- De : Andy McKay [mailto:andym@ActiveState.com] Envoyé : mardi 9 janvier 2001 14:31 À : Menard.Jean-Francois@hydro.qc.ca; zope@zope.org Objet : Re: [Zope] Currency formatting
From the quick hack department:
1: hack the source: DT_Var line 375... or 2: Write a bit DTML method that is along the lines of: return_money: <dtml-var value thousands_commas fmt=dollars-and-cents> then a DTML Document that has wher value is the value you want: <dtml-call "REQUEST.set('v', return_money(_.None, _, value=value))"> <dtml-call "REQUEST.set('v', _.string.replace(v, ',', ' '))"> <dtml-call "REQUEST.set('v', _.string.replace(v, '.', ','))"> <dtml-var v> 3: This could of course using PythonScript much better.... -- Andy McKay. ----- Original Message ----- From: <Menard.Jean-Francois@hydro.qc.ca> To: <zope@zope.org> Sent: Tuesday, January 09, 2001 10:41 AM Subject: [Zope] Currency formatting
I would like to output currency as: 1 300 459,63$ I looked at the documention, and I cannot figure how to:
- Place spaces instead of commas as thousand separators. - Replace the dot by a comma for the decimals.
Any clues?
Jean-François Ménard Intranet DPAS Pratiques d'affaires et orientations * (514) 840-3000 poste 3939 * (514) 840-5585 * menard.jean-francois@hydro.qc.ca * 855 Ste-Catherine est, 6e étage Montréal, Qué. H2L 4P5
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )