Download the PHP package helios-ag/php_rutils without Composer
On this page you can find all versions of the php package helios-ag/php_rutils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download helios-ag/php_rutils
More information about helios-ag/php_rutils
Files in helios-ag/php_rutils
Package php_rutils
Short Description RUtils is a Russian-specific string utils (transliteration, numeral is words, russian dates, typography)
License MIT
Homepage https://github.com/helios-ag/php_rutils
Informations about the package php_rutils
PHP RUtils
Summary
RUtils is a Russian-specific string utils (transliteration, numeral is words, russian dates, typography) for PHP. This is a port of the Python Pytils to PHP.
See additional docs and examples in doc subdir.
Library is published on the Composer: https://packagist.org/packages/helios-ag/php_rutils
Requires PHP 8.3+.
RUtils — утилиты для работы c текстом на русском языке (транслитерация, числительные словами, русские даты, простая типографика) для языка PHP. RUtils — порт утилит Pytils на PHP.
Документацию и примеры смотрите в каталоге doc.
Библиотека доступна через Composer: https://packagist.org/packages/helios-ag/php_rutils
Буду рад принять помощь по проекту в виде советов, баг-репортов и pull-реквестов.
Проект использует PSR-4 autoloading, PHP CS Fixer и Psalm.
Проверка стиля и статический анализ запускаются в CI и доступны локально через Makefile.
Development
- Local dev environment:
docker compose up -dormake up - Shell in container:
make shell - Tests:
make test - Fix code style:
make cs-fix - Static analysis:
make psalm - VS Code / OpenCode devcontainer:
.devcontainer/devcontainer.json - Doc examples in
doc/examples/run standalone.
Хочу сказать большое спасибо всем людям, внесшим свой вклад в улучшение проекта.
Basic usage
Modules of PHP RUtils:
- Numeral - Plural forms and in-word representation for numerals
- Dt - Russian dates without locales and other dates handling
- Translit - Simple transliteration
- Typo - Basic russian typography
Numeral
Choosing the word form depending of a number:
Choosing the word form and print number in words:
Print number in words:
Print money (RUB):
Dt
Today date:
\php_rutils\struct\TimeParams - params structure, may be passed as array
Historical date:
Time interval to fixed date:
Time interval from fixed date to fixed date:
Age:
Translit
Typo
All versions of php_rutils with dependencies
ext-mbstring Version *