oblak / number-serbianisation
Convert numbers to words in Serbian language
v1.0.0
2024-04-26 02:51 UTC
Requires
- php: ^8.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
- slevomat/coding-standard: ^8.15
- squizlabs/php_codesniffer: ^3.9
This package is auto-updated.
Last update: 2024-10-26 04:31:05 UTC
README
Installation
You can install the package via composer:
composer require oblak/number-serbianisation
Usage
<?php use Oblak\Intl\NumberSerbianizer; use Oblak\Intl\NumberScale; require 'vendor/autoload.php'; $srn = new NumberSerbianizer(); echo $srn->toWordString(1000); // jedna hiljada echo $srn->useAccusative()->toWordString(1000); // hiljadu echo $srn->useScale(NumberScale::Short)->toWordString(1000000000); // jedan bilion echo $srn->useScale(NumberScale::Long)->toWordString(1000000000); // jedna milijarda echo $srn->useAccusative()->toWordString(1000000000); // milijardu