fasamr / indrupee
将数字转换为印度卢比格式
1.0
2021-04-23 18:24 UTC
README
将数字转换为印度卢比格式。以文字、以十亿(Crores)、以百万(Lakhs)、带印度逗号、转换为其他法定货币和加密货币
安装
composer require fasamr/indrupee
用法
创建实例
<?php $rupee = new \IndRupee\IndRupee(); ?>
示例
<?php echo $rupee->inwords(51111111.88); // Five Crore Eleven Lakhs Eleven Thousands One Hundred and Eleven Rupees Eight Eight Paise
<?php $echo $rupee->withcomma(51111111.88,1); // will return 5,11,11,111.88, if you want rupee symbol prefix (₹) add second parameter as 1 or 0
<?php echo $rupee->incrores(50222587.689,2,1); // will return 5.02 Crores, 2nd parameter '2' defines number of decimal points needed, //3rd parameter adds prefix (₹) when 1 or 0
<?php echo $rupee->inlakhs(90222587,2,0); // will return 902.23 Lakhs, 2nd parameter for number of decimal points, 3rd for inr symbol prefix
<?php echo $rupee->fiatconvert("USD","INR",1); // will return 74.38
<?php echo $rupee->cryptoconvert("INR","BTC",1); // will return 2796810.45
<?php echo $rupee->inwords($rupee->cryptoconvert("INR","BTC",1)); // will return Twenty Seven Lakhs Ninety Six Thousands Eight Hundred and Ten Rupees Four Five Paise