tiny-blocks/currency

Value Object representing a currency using ISO-4217 specifications.

Maintainers

Package info

github.com/tiny-blocks/currency

pkg:composer/tiny-blocks/currency

Statistics

Installs: 22 185

Dependents: 1

Suggesters: 0

Stars: 4

Open Issues: 0

2.3.0 2026-01-15 12:21 UTC

This package is auto-updated.

Last update: 2026-03-17 07:01:54 UTC


README

License

Overview

Value Object representing a currency using ISO-4217 specifications.

Installation

composer require tiny-blocks/currency

How to use

The library exposes a concrete implementation through the Currency enum. Besides, the alphabetic code, you can get the default amount fraction digits for the respective currency.

$currency = Currency::USD;

$currency->name;                # USD
$currency->value;               # USD
$currency->getFractionDigits(); # 2

License

Currency is licensed under MIT.

Contributing

Please follow the contributing guidelines to contribute to the project.