{"id":15366949,"url":"https://github.com/fortis/iso-currency","last_synced_at":"2025-04-15T12:33:32.730Z","repository":{"id":56982494,"uuid":"102970684","full_name":"fortis/iso-currency","owner":"fortis","description":"A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.","archived":false,"fork":false,"pushed_at":"2021-08-26T08:52:29.000Z","size":59,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T20:12:14.625Z","etag":null,"topics":["bcmath","currency","currency-iso","gmp","money"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fortis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-09T16:55:48.000Z","updated_at":"2020-10-11T17:13:24.000Z","dependencies_parsed_at":"2022-08-21T08:40:32.529Z","dependency_job_id":null,"html_url":"https://github.com/fortis/iso-currency","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortis%2Fiso-currency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortis%2Fiso-currency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortis%2Fiso-currency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortis%2Fiso-currency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortis","download_url":"https://codeload.github.com/fortis/iso-currency/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072345,"owners_count":21208175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcmath","currency","currency-iso","gmp","money"],"created_at":"2024-10-01T13:20:32.192Z","updated_at":"2025-04-15T12:33:32.711Z","avatar_url":"https://github.com/fortis.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iso-currency\n\n[![Travis](https://img.shields.io/travis/fortis/iso-currency.svg?branch=master)](https://travis-ci.org/fortis/iso-currency)\n[![Coveralls](https://img.shields.io/coveralls/fortis/iso-currency/master.svg)](https://coveralls.io/github/fortis/iso-currency?branch=master)\n[![Packagist](https://img.shields.io/packagist/l/fortis/iso-currency.svg)](https://packagist.org/packages/fortis/iso-currency)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Ffortis%2Fiso-currency.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Ffortis%2Fiso-currency?ref=badge_shield)\n\nVery simple and easy-to-use `Currency` class to work with ISO 4217 currencies as they provided by the official ISO Maintenance Agency\n\n## What is ISO 4217\n\n\u003e ISO 4217 is a standard published by the International Organization for Standardization, which delineates currency designators, country codes (alpha and numeric), and references to minor units in three tables.\n\u003e\n\u003e *-- [Wikipedia](http://en.wikipedia.org/wiki/ISO_4217)*\n\n## Install\n\nInstall directly from command line using Composer\n``` bash\ncomposer require fortis/iso-currency\n```\n\n## Use\n\nDon't type currency codes as strings, instead it's better to use constants from auto generated CurrencyCode class as it's always up-to-date with currency-iso.org and helps you avoid typos.\nFor example, use `CurrencyCode::USD` instead of `'USD'`. Autocomplete will make it easier.\n\nAlso you can create new currency object with Currency class and autocomplete: `new Currency::USD()`.\n\n``` php\n// Create Currency instance.\n$currency = new Currency(CurrencyCode::EUR);     // constructor  \n$currency = Currency::create(CurrencyCode::EUR); // static factory method\n$currency = Currency::EUR();                     // short syntax with autocomplete on ::\n\n// Currency code validation.\n$currency = new Currency('EUE'); // throws InvalidCurrencyException\n\n// Check whether the given Currency is USD/EUR/etc.\n$currency = new Currency(CurrencyCode::EUR);\n$currency-\u003eis(Currency::EUR()); // true\n$currency-\u003eis(Currency::USD()); // false\n```\n\n## License\n\niso-currency is licensed under the MIT license.\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Ffortis%2Fiso-currency.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Ffortis%2Fiso-currency?ref=badge_large)\n\n## Source(s)\n\n* \"[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)\" by [Wikipedia](http://www.wikipedia.org) licensed under [CC BY-SA 3.0 Unported License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortis%2Fiso-currency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortis%2Fiso-currency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortis%2Fiso-currency/lists"}