https://github.com/inquid/yii-to-words
Convert a number to words
https://github.com/inquid/yii-to-words
Last synced: 4 months ago
JSON representation
Convert a number to words
- Host: GitHub
- URL: https://github.com/inquid/yii-to-words
- Owner: inquid
- Created: 2018-12-10T05:56:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T21:52:25.000Z (over 6 years ago)
- Last Synced: 2025-01-30T01:16:14.229Z (5 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii Numero Letras
=================
Convierte un número a letrasInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist inquid/yii-en-letras "*"
```or add
```
"inquid/yii-en-letras": "*"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it in your code by :
```php
$letras = EnLetras::convertir(12345);
```
Si deseas convertir un número con decimales y mostrar la moneda:
```php
$letras = EnLetras::convertir(12345.67, 'colones', 'centimos');
```Lo cual te devuelve: *DOCE MIL TRESCIENTOS CUARENTA Y CINCO COLONES CON SESENTA Y SIETE CENTIMOS*
## Créditos
Basado en https://github.com/arielcr/numero-a-letras