wmde / Number

Numerical value objects, parsers and formatters
Other
18 stars 6 forks source link

DataValues Number

Library containing value objects to represent numeric information, parsers to turn user input into such value objects, and formatters to turn them back into user consumable representations.

It is part of the DataValues set of libraries.

Build Status Code Coverage Scrutinizer Quality Score

On Packagist: Latest Stable Version Download count

Installation

The recommended way to use this library is via Composer.

Composer

To add this package as a local, per-project dependency to your project, simply add a dependency on data-values/number to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on version 0.8 of this package:

{
    "require": {
        "data-values/number": "0.12.*"
    }
}

Manual

Get the code of this package, either via git, or some other means. Also get all dependencies. You can find a list of the dependencies in the "require" section of the composer.json file. Then take care of autoloading the classes defined in the src directory.

Tests

This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these tests using the PHPUnit configuration file found in the root directory. The tests can also be run via TravisCI, as a TravisCI configuration file is also provided in the root directory.

Authors

DataValues Number was created by Wikimedia Deutschland employees for the Wikidata project.

Release notes

0.12.3 (2022-10-24)

0.12.2 (2022-10-21)

0.12.1 (2022-10-21)

0.12.0 (2022-10-21)

0.11.1 (2021-03-31)

0.11.0 (2021-03-15)

0.10.2 (2021-03-15)

0.10.1 (2018-10-31)

0.10.0 (2018-04-11)

0.9.1 (2017-08-09)

0.9.0 (2017-08-09)

0.8.3 (2017-06-26)

0.8.2 (2016-11-17)

0.8.1 (2016-08-02)

0.8.0 (2016-08-01)

0.7.0 (2016-04-25)

Breaking changes

Other changes

0.6.0 (2015-09-09)

Breaking changes

Additions

Other changes

0.5.0 (2015-06-11)

Breaking changes

Additions

Other changes

0.4.1 (2014-10-09)

0.4 (2014-04-24)

0.3 (2014-03-12)

0.2 (2013-12-16)

Removals

Additions

Improvements

Bug fixes

0.1 (2013-11-17)

Initial release with these features:

Links