milax / mconsole-currency
There is no license information available for the latest version (dev-master) of this package.
Provides currency tools for Mconsole
dev-master
2017-03-27 01:02 UTC
Requires
- milax/mconsole: ^0.5
This package is auto-updated.
Last update: 2024-11-07 18:38:19 UTC
README
Demo data
Create new currency record:
INSERT INTO `mconsole_currencies` (`id`, `name`, `prefix`, `suffix`, `basic`, `decimals`, `delimiter`, `names`, `system`, `created_at`, `updated_at`) VALUES (1,'USA Dollar','$','',100,2,'.','["cent", "dollar"]',0,'2016-09-05 03:15:35','2016-09-05 03:15:38');
Methods
format (int amount, bool withName)
Returns formatted currency number
$currency->format(10050); // 100.50 $curremcy->format(10050, true) // $100.50