oblak/number-serbianisation

Convert numbers to words in Serbian language

v1.0.0 2024-04-26 02:51 UTC

This package is auto-updated.

Last update: 2024-10-26 04:31:05 UTC


README

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