vlaim / slownie
A library for writing numbers in word form in Polish
Installs: 9 978
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.12.32
- phpunit/phpunit: ^8
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-10-06 16:21:10 UTC
README
🇵🇱 Ta biblioteka pomaga zapisać liczby w postaci słownej.
This library helps you to write numbers into words in Polish.
Installation
Composer package
Use composer to install this package.
{
"require": {
"vlaim/slownie": "1.0.*"
}
}
Basic usage
Slownie::convert($number, bool $hideGrosze = false, bool $hideZlote = false)
$number – number to convert, integer, float or string (not recommended) can be passed here
$hideGrosze - hides grosze (00/100)
$hideZłote - hides złoty form
Slownie::convert(10348) // dziesięć tysięcy trzysta czterdzieści osiem złotych 00/100
To hide grosze pass true
as the second param
Slownie::convert(10348, true) // dziesięć tysięcy trzysta czterdzieści osiem złotych
To hide złoty / złotych / złote pass true
as the third param
Slownie::convert(10348, true, true) // dziesięć tysięcy trzysta czterdzieści osiem
Tests
To run tests
composer test
Issues
Bug reports and feature requests can be submitted on the Github Issue Tracker.
Feel free to open an issue on every question you have.
License
vlaim/slownie is released under the MIT License. See the bundled LICENSE.md for details.