NAME

Locale::Formatmoney::format_money - format an amount of money for output


SYNOPSIS

        use Locale::Formatmoney;

        print format_money(-123456789.123457, 'fr', 'frf'), "\n";


DESCRIPTION

        Format an amount of money and return the result in a string. Two
        hash arrays are used to configure the output 
        (%monetary_presentation and %monetary_specific). 

format_money amount language money [ long_name ]

        The result is a string following the local convention, for exemple: 
        format_money(123456789.123457, 'fr', 'frf', 0)="123 456 789,12 FRF"

amount
 a reel number

language
 the country of the reader (fr or en), see %monetary_presentation to extend
 the choice.

money
 the money of the amount (frf ou eur), see %monetary_specific to
 extend the choice.

long_name
 do we print the money with the long name (1) or with the
 abreviation (0), default is 0


EXAMPLE

        print format_money(-123456789.123457, 'fr', 'frf');

        will print "-123 456 789,12 FRF".


BUGS

There is problem with ``cents'', the sprintf function rouded off the amount and I don't control the result wich is BAD in my case: 0.045 -> ``0,04 FRF'' 0.005 -> ``0,01 FRF''

There are plenty other bugs and at least one with terrible concequances for you, you have been warned.


AUTHOR AND COPYRIGHT

Copyright Emmanuel Chantréau echant@maretamanu.org 1999, Distributed under the terms of the Gnu General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License for more details.