NAME
Lingua::ZH::Currency::UpperCase - Convert Currency Numbers to Chinese UpperCase Format
SYNOPSIS
use Lingua::ZH::Currency::UpperCase;
print chinese_currency_uc( 2504.39 );
DESCRIPTION
The main subroutine get a number and give a chinese string which has been converted as currency upper case for finance processing. As Check or Invoce that need.
0 : 0
0.03 : ÁãÈþ·Ö
1.04 : Ò¼Ô²ÁãËÁ·Ö
-12.00 : Ҽʰ·¡Ô²Õû
102.15 : Ò¼°ÛÁã·¡Ô²Ò¼½ÇÎé·Ö
2004 : ·¡ÇªÁãËÁÔ²Õû
50142 : ÎéÍòÁãÒ¼°ÛËÁÊ°·¡Ô²Õû
400102 : ËÁÊ°ÍòÁãÒ¼°ÛÁã·¡Ô²Õû
50000045.01 : ÎéǪÍòÁãËÁÊ°ÎéÔ²ÁãÒ¼·Ö
123456789.00 : Ò¼ÒÚ·¡ÇªÈþ°ÛËÁÊ°ÎéÍò½ǪÆâ°Û°ÆÊ°¾ÁÔ²Õû
9876543219876.123 : 9876543219876.123
chinese_currency_uc( $number )
my $words = chinese_currency_uc( 123.45 );
my $words = chinese_currency_uc( 123.45 );
The number is only 12 interger length and the float will restrict to 2 length, ortherwise it just return the orignal number which passed in. If the number is negotive, we just ignore the '-'.
chinese_currency_uc is auto exported.
_convert_integer_every_four_digits( $number, $start_point )
here the $number is a number which maxlength is 4. The $start_point is an array index refer to @integer_unit. Returns a string which temporily converted, and contains some alpha number 0 to suit later handling.
It is the private subroutine, so just leave it be.
SEE ALSO
TODO
utf-8 encoding support. oop interface. if need, there also could be a module: Lingua::ZH::Currency::LowerCase;
AUTHORS
Chun Sheng <me@chunzi.org>
COPYRIGHT
Copyright 2004 by Chun Sheng <me@chunzi.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 33:
Non-ASCII character seen before =encoding in 'ÁãÈþ·Ö'. Assuming CP1252