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 UTF-8