hrbmt/numeral

A PHP library for formatting and manipulating numbers.

v0.1 2021-04-06 04:34 UTC

This package is auto-updated.

Last update: 2024-06-06 14:31:53 UTC


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

This package can be installed using Composer by issuing this command in the root of your project:

composer require hrbmt/numeral

Getting Started

<?php

use Hrbmt\Numeral\Numeral;

// Create the Numeral instance.
$formatter = new Numeral;

// solution 1
$formatter->setNumber(1000)->format('0,0');

// OR

// solution 2
Numeral::setNumber(1000)->format('0,0');

Numbers

Number Format String
10000.234 10000
10000.234 '0.00' 10000.23
10000.234 '0,0.00' 10,000.23
10000.234 '0,0' 10,000

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Author

Yang H.