currency:Go的货币处理 源码
货币 处理货币金额,提供货币信息和格式。 由CLDR v38提供支持,仅约30kb的数据。 背景: ://bojanz.github.io/price-currency-handling-go/ 特征 所有货币代码,其数字代码和小数位数。 所有语言环境的货币符号和格式。 具有值语义的数量结构(福勒的钱模式) 格式化程序,用于格式化金额和解析格式化的金额。 amount , _ := currency . NewAmount ( "275.98" , "EUR" ) total , _ := amount . Mul ( "4" ) locale := currency . NewLocale ( "fr" ) formatter := currency . NewFormatter ( locale ) fmt . Println ( form
下载地址
用户评论