没有合适的资源?快使用搜索试试~ 我知道了~
money:Elixir库,可更安全,更轻松,更有趣地使用Money ...是对fun.prog中Fowler's Money模...
共32个文件
exs:14个
ex:11个
md:4个
需积分: 9 0 下载量 59 浏览量
2021-05-01
08:12:48
上传
评论
收藏 36KB ZIP 举报
温馨提示
钱 Elixir库可以更安全,更轻松,更有趣地使用Money,这是对函数式编程中Martin Fowler的一种解释。 “如果每次见到有人使用FLOAT来存储货币时,我都会得到一角钱,我将有999.997634美元” – 简而言之:您不应该用浮点数表示货币价值。 无论您在哪里需要代表金钱,请使用Money 。 用法 five_eur = Money . new ( 500 , :EUR ) # %Money{amount: 500, currency: :EUR} ten_eur = Money . add (five_eur, five_eur) # %Money{amount: 10_00, currency: :EUR} hundred_eur = Money . multiply (ten_eur,
资源推荐
资源详情
资源评论
收起资源包目录
money-master.zip (32个子文件)
money-master
mix.lock 4KB
.gitignore 61B
mix.exs 2KB
LICENSE.md 1KB
.travis.yml 266B
CONTRIBUTING.md 427B
.formatter.exs 106B
CHANGELOG.md 4KB
README.md 11KB
.credo.exs 6KB
lib
money
phoenix_html_safe.ex 174B
currency
ecto_type.ex 1KB
sigils.ex 789B
ecto_type.ex 2KB
currency.ex 21KB
ecto
numeric_currency_type.ex 1KB
currency_type.ex 1KB
composite_type.ex 2KB
map_type.ex 1KB
amount_type.ex 2KB
money.ex 20KB
test
test_helper.exs 15B
money_test.exs 12KB
money
sigils_test.exs 1KB
phoenix_html_safe_test.exs 315B
ecto_type_test.exs 2KB
ecto
numeric_currency_type_test.exs 850B
amount_type_test.exs 2KB
currency_type_test.exs 1KB
composite_type_test.exs 1KB
map_type_test.exs 2KB
currency_test.exs 4KB
共 32 条
- 1
资源评论
租租车国内租车
- 粉丝: 19
- 资源: 4599
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功