vlaim/slownie

A library for writing numbers in word form in Polish

1.0.1 2021-06-08 08:49 UTC

This package is auto-updated.

Last update: 2024-11-06 16:27:04 UTC


README

Build Status Latest Version on Packagist Software License

"Buy Me A Coffee"

🇵🇱 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.