Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.49 KB

README.md

File metadata and controls

37 lines (23 loc) · 1.49 KB

oblak/number-serbianisation Readme EN Readme SR

Packagist Version Packagist Dependency Version codecov semantic-release: angular

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