RELEASE // THESMARTER/TAFQEET
2.1โ STABLEโ 0 downloads0 files ยท 0 B
$ gh release view 2.1 --repo thesmarter/TafqeetQuick install
$ gh release download 2.1 --repo thesmarter/TafqeetFILES // 0 ASSETS
Downloads
$ NO_ATTACHED_BINARIES โ grab the source archive below.
NOTES // CHANGELOG
Release notes
๐ What's New in v2.1
#### ๐ฑ New: Expanded Currency Support Added 16 new currencies bringing total support to 19 currencies:
Arab Currencies / ุงูุนู ูุงุช ุงูุนุฑุจูุฉ:
| Code | Currency |
|---|---|
egp | Egyptian Pound (ุฌููู ู ุตุฑู) |
syp | Syrian Pound (ุฌููู ุณูุฑู) |
lbp | Lebanese Pound (ุฌููู ูุจูุงูู) |
iqd | Iraqi Dinar (ุฏููุงุฑ ุนุฑุงูู) |
jod | Jordanian Dinar (ุฏููุงุฑ ุฃุฑุฏูู) |
omr | Omani Rial (ุฑูุงู ุนู ุงูู) |
qar | Qatari Rial (ุฑูุงู ูุทุฑู) |
aed | UAE Dirham (ุฏุฑูู ุฅู ุงุฑุงุชู) |
kwd | Kuwaiti Dinar (ุฏููุงุฑ ูููุชู) |
bhd | Bahraini Dinar (ุฏููุงุฑ ุจุญุฑููู) |
Western Currencies / ุงูุนู ูุงุช ุงูุบุฑุจูุฉ:
| Code | Currency |
|---|---|
eur | Euro (ููุฑู) |
gbp | British Pound (ุฌููู ุฅุณุชุฑูููู) |
cad | Canadian Dollar (ุฏููุงุฑ ููุฏู) |
aud | Australian Dollar (ุฏููุงุฑ ุฃุณุชุฑุงูู) |
jpy | Japanese Yen (ูู ูุงุจุงูู) |
chf | Swiss Franc (ูุฑูู ุณููุณุฑู) |
#### ๐ Bug Fixes
- Fixed SDG currency main name:
ูุฑุดโุฌููู(was incorrectly set to piastre instead of pound) - Fixed empty fractional currency handling (e.g., JPY has no sub-unit) - no longer appends empty words
#### ๐ Documentation
- Updated README with comprehensive currency tables grouped by Arab and Western
- Added bilingual currency tables in both English and Arabic READMEs
๐ Full Change List
- Modified:
src/Core/Tafqeet.php- Expanded CURRENCIES constant (3 โ 19 currencies) - Modified:
src/Core/Tafqeet.php- Handle empty fractional units gracefully - Modified:
README.md- Updated currency tables - Modified:
README-ar.md- Updated currency tables - Added: 13 new currency test cases
๐ก Usage Examples
PHP
// Egyptian Pound
Tafqeet::arablic(1000.50, 'egp');
// Output: ููุท ุฃูู ุฌููู ูุฎู
ุณูู ูุฑุด ูุงุบูุฑ
// UAE Dirham
Tafqeet::arablic(500, 'aed');
// Output: ููุท ุฎู
ุณูู ุฏุฑูู
ูุง ูุงุบูุฑ
// Euro
Tafqeet::arablic(250.75, 'eur');
// Output: ููุท ู
ุงุฆุฉ ูุฎู
ุณูู ููุฑููุง ูุณุจุนุฉ ูุณุจุนูู ุณูุช ูุงุบูุฑ
// British Pound
Tafqeet::arablic(100, 'gbp');
// Output: ููุท ู
ุงุฆุฉ ุฌููู ุฅุณุชุฑูููููุง ูุงุบูุฑ
// Japanese Yen (no fractional)
Tafqeet::arablic(1000, 'jpy');
// Output: ููุท ุฃูู ูู ูุงุบูุฑ๐ง Technical Details
- Currencies stored as associative array with:
main1,main2,single,multi - Empty
single/multivalues are skipped in output (e.g., JPY) - All 17 PHPUnit tests passing โ
- PSR-12 compliant โ
Full Changelog: https://github.com/thesmarter/Tafqeet/compare/v2.0...2.1