Function: toZhCN

toZhCN(num): string

将数字或字符串转换为中文大写金额

Parameters

Name Type Description
num string | number 需要转换的数字或字符串

Returns

string

标准会计格式的中文大写金额字符串

Example

toZhCN(500.3); // => "伍佰元叁角整"
toZhCN("1234.56"); // => "壹仟贰佰叁拾肆元伍角陆分"

Throws

当输入数据不符合格式要求时抛出错误

ON THIS PAGE