short-number

Lightweight package that shortens given number by taking digits and adding K, M, B or T after them. For example 1234 will be formatted to 1K and 20244023 to 20M. Package supports multiple languages

MIT License

Downloads
2.5K
Stars
6
Committers
2
short-number - v3.0.7 Latest Release

Published by SerhiiCho about 2 months ago

  • Remove not working badge from README.md file
  • Update composer dev packages to the latest versions
  • Remove backslashes from each native PHP function in the codebase
short-number - v3.0.6

Published by SerhiiCho 8 months ago

  • Fixed typos in CHANGELOG.md file
  • Updated README.md file by adding a badge and LICENSE section
short-number - v3.0.5

Published by SerhiiCho 8 months ago

  • Code refactoring
  • Moved scripts from Makefile to composer.json file
  • Updated phpstan to the latest version
short-number - v3.0.4

Published by SerhiiCho 12 months ago

  • Added support for PHP 8.3
short-number - v3.0.3

Published by SerhiiCho about 1 year ago

  • Renamed master branch to main
  • Added support for PHP 8.2
  • Installed Pint
  • Formatted code with Pint
  • Added Pint checks to github actions
short-number - v3.0.2

Published by SerhiiCho over 2 years ago

  • Removed section in docs that is not relevant;
short-number - v3.0.1

Published by SerhiiCho over 2 years ago

  • Added link to README.md that shows example of usage;
  • Fixed bug with default English language. It didn't default to English when language is not set;
short-number - v3.0.0

Published by SerhiiCho over 2 years ago

  • Added CHANGELOG.md file;
  • Removed ability to pass option Option::UPPER as the second argument to conv method;
  • Added support for PHP 8.1;
  • Added .gitattributes to exclude Makefile;
  • Improved documentation;
  • Removed support for PHP 7.1;
short-number - v2.0.3

Published by SerhiiCho over 3 years ago

  • Added support for php 8 in composer.json file
short-number - v2.0.2

Published by SerhiiCho almost 4 years ago

  • Added phpstan.
  • Added phpcs.
  • Added ability to overwrite any amount of fields, not just 4 fields.
  • Refactored code.
short-number - v2.0.1

Published by SerhiiCho almost 4 years ago

  • Fixed mistakes in documentation.
short-number - v2.0

Published by SerhiiCho almost 4 years ago

  • Renamed Conv class to Number.
  • Renamed short() method to trans().
  • Added support for Ukrainian language.
  • Added easy way to contribute new language support.
  • Improved documentation.
  • Added CONTRIBUTE.md file with instructions how to contribute language support.
  • Fixed bug when you couldn't convert negative numbers.
  • Added ability to overwrite translations by passing array to Lang::set() method as the second argument.
  • Changed string options with constants.
  • Changed default case to lowercase instead of uppercase.
  • Added more tests.
  • Added php8 to github actions CI.
short-number - v1.1.1

Published by SerhiiCho almost 4 years ago

  • Added MIT license
short-number - v1.1

Published by SerhiiCho almost 5 years ago

Changed namespace for tests

short-number - v1.0.1

Published by SerhiiCho almost 5 years ago

short-number - v1.0

Published by SerhiiCho almost 5 years ago

First version