meismem / ethio-kit
Zero-dependency Ethiopian developer and creator kit for PHP (Calendar, Ge'ez Numerals, Bahire Hasab, Business Days, Ethiopic Script & IME, 14 Regions, Phones, Fayda Verhoeff, ETB Currency & Words, Payments, Webhooks & 35+ Bank Receipts).
v0.7.0
2026-11-29 11:38 UTC
Requires
- php: ^8.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
π Live Interactive Playground: https://meismem.github.io/ethio-kit/
π Full API Documentation: https://meismem.github.io/ethio-kit/docs.html
Zero-dependency, browser-safe Ethiopian developer & creator foundation with spec-locked parity across Python (PyPI), JavaScript/TypeScript (npm), Dart/Flutter (pub.dev), and PHP 8.1+ (Packagist / PSR-4)βverified against spec/golden_vectors.json.
Installation
# Python 3.9+ (includes `ethio-kit` CLI) pip install ethio-kit # JavaScript / TypeScript (ESM + CJS + Browser/Edge + `npx ethio-kit` CLI) npm install ethio-kit # Dart / Flutter 3.0+ (includes `ethio-kit` CLI executable) dart pub add ethio_kit # PHP 8.1+ (zero extensions beyond PHP core + `vendor/bin/ethio-kit` CLI) composer require meismem/ethio-kit
CLI Quickstart
ethio-kit today --lang am --geez
ethio-kit cal 2019 1 --geez
ethio-kit holidays 2019 --islamic --tag christian
ethio-kit fasting 2019
ethio-kit nigs --major
ethio-kit fidel "selamta"
ethio-kit birr 1234.50 --words --lang am
Library Quickstart
Python
from ethio_kit import ( gregorian_to_ethiopian, ethiopian_month_grid, ethiopian_fasting_periods, add_ethiopian_business_days, parse_receipt_reference, build_receipt_url, verify_fayda_checksum, etb_to_words, ) ec = gregorian_to_ethiopian(2026, 11, 25) # EthiopicDate(2019, 3, 16) print(ec.format("ti", include_weekday=True, use_geez=True)) grid = ethiopian_month_grid(2019, 1, lang="am", include_holidays=True, include_nigs=True) fasts = ethiopian_fasting_periods(2019) # 6 Orthodox seasonal fasts due = add_ethiopian_business_days(ec, 5) # Skips weekends + Ethiopian holidays ref = parse_receipt_reference("Your transaction reference is FT24321XYZ99. CBE") url = build_receipt_url(ref.provider, ref.reference, account_suffix="12345678") fayda = verify_fayda_checksum("2345-6789-0124") # checksum_valid=True print(etb_to_words("1234.50", lang="am"))
JavaScript / TypeScript
import { gregorianToEthiopian, formatEthiopicDate, ethiopianMonthGrid, isEthiopianFastingDay, parseReceiptReference, buildReceiptUrl, verifyFaydaChecksum, etbToWords, } from "ethio-kit"; const ec = gregorianToEthiopian(2026, 11, 25); console.log(formatEthiopicDate(ec, { lang: "ti", includeWeekday: true, useGeez: true })); const grid = ethiopianMonthGrid(2019, 1, { lang: "am", includeNigs: true }); console.log(isEthiopianFastingDay(ec)); const ref = parseReceiptReference("Your transaction reference is FT24321XYZ99. CBE"); const url = buildReceiptUrl(ref.provider, ref.reference, { accountSuffix: "12345678" }); const fayda = verifyFaydaChecksum("2345-6789-0124"); console.log(etbToWords("1234.50", "am"));
Dart / Flutter
import 'package:ethio_kit/ethio_kit.dart'; void main() { final ec = gregorianToEthiopian(2026, 11, 25); print(ec.format(lang: 'ti', includeWeekday: true, useGeez: true)); final grid = ethiopianMonthGrid(2019, 1, lang: 'am', includeNigs: true); print('Weeks in ${grid.monthName}: ${grid.weeks.length}'); final ref = parseReceiptReference('Your transaction reference is FT24321XYZ99. CBE'); final url = buildReceiptUrl(ref.provider!, ref.reference!, accountSuffix: '12345678'); final fayda = verifyFaydaChecksum('2345-6789-0124'); print(etbToWords('1234.50', lang: 'am')); }
PHP 8.1+
<?php use EthioKit\EthioKit; $ec = EthioKit::gregorianToEthiopian(2026, 11, 25); // EthiopicDate(2019, 3, 16) echo $ec->format('ti', includeWeekday: true, useGeez: true) . PHP_EOL; $grid = EthioKit::ethiopianMonthGrid(2019, 1, lang: 'am', includeNigs: true); $due = EthioKit::addEthiopianBusinessDays($ec, 5); $ref = EthioKit::parseReceiptReference('Your transaction reference is FT24321XYZ99. CBE'); $url = EthioKit::buildReceiptUrl($ref->provider, $ref->reference, '12345678'); $fayda = EthioKit::verifyFaydaChecksum('2345-6789-0124'); // $fayda->checksumValid === true echo EthioKit::etbToWords('1234.50', 'am') . PHP_EOL;
4-Language Per-Feature Support Matrix (v0.7.0)
| Domain & Capability | Python (ethio-kit) |
JS / TS (ethio-kit) |
Dart / Flutter (ethio_kit) |
PHP 8.1+ (meismem/ethio-kit) |
|---|---|---|---|---|
| Ethiopian β Gregorian (1800β2200 ICU verified) | β | β | β | β |
4-Language Formatting (am, en, om, ti) + Ge'ez |
β | β | β | β |
| 13-Month Date Arithmetic, Diffs, Boundaries & Ranges | β | β | β | β |
2D Month/Year Grids (MonthGrid) & ASCII/Ge'ez Table |
β | β | β | β |
| Full Bahire Hasab (10 Movable Feasts/Fasts, Metqi=30) | β | β | β | β |
| Public + Tabular/Custom Islamic Holidays + Tag Filter | β | β | β | β |
6 Orthodox Fasting Seasons + is_ethiopian_fasting_day |
β | β | β | β |
| 30-Day Monthly Orthodox Nigs + Pagume 3 Commemorations | β | β | β | β |
Ethiopian Business-Day Calculator (Β±N SLA days) |
β | β | β | β |
| 12-Hour Ethiopian Clock Formatting & Time Arithmetic | β | β | β | β |
Bidirectional Ge'ez Numerals (1..99999999+) |
β | β | β | β |
| Ethiopic Homophone Normalization & Phonetic IME | β | β | β | β |
| Creator Slugify, Subtitle Line Wrap & Script Stats | β | β | β | β |
| 14 Regions & Chartered Cities + Dialing Prefixes | β | β | β | β |
| Ethiopian Mobile, Regional Landline & Shortcode Parser | β | β | β | β |
| 12-Digit FIN / 16-Digit FAN Fayda Verhoeff Checksum | β | β | β | β |
| Arbitrary-Precision ETB Formatting & Multilingual Words | β | β | β | β |
| Chapa, Telebirr Fabric, SantimPay & ArifPay Builders | β | β | β | β |
| Constant-Time Webhook HMAC + Timestamp Replay Guard | β | β | β | β |
| 35 Ethiopian Bank & Mobile Wallet SMS/URL Receipts | β | β | β | β |
Dedicated ethio-kit Command-Line Interface (CLI) |
β | β | β | β |
Modules & Drop-in UI Examples
- Calendar, Grids, Bahire Hasab, Fasting, Nigs & Business Days: BeyeneβKudlek / Unicode ICU conversion,
am/en/om/tiformatting,ethiopian_month_grid/ethiopian_year_grid/format_month_calendar, 10 Bahire Hasab movable feasts/fasts, 6 Orthodox fasting periods, 30 monthly Nigs commemorations, category-tagged public + Islamic holidays (next_ethiopian_holiday), and Ethiopian business-day calculator. - Ethiopic Script, Ejective/Labialized IME & Creator Tools: Homophone normalization (
normalize_ethiopic), reversible phonetic transliteration (fidel_to_latin,latin_to_fidel), URL slugifier (ethiopic_slugify), subtitle wrapping (wrap_subtitle_lines), and script composition stats (count_ethiopic_stats). - Offline Ethiopian Geo Dataset, Phones, Fayda & ETB: All 14 Ethiopian divisions, mobile/landline/shortcode phone validation, MOSIP Verhoeff Fayda ID verification, arbitrary-precision ETB splitting/formatting, and
etb_to_words(en,am,om). - Unified Payments, Webhooks & 35+ Bank Receipts: HTTPS-by-default checkout builders (with redacted API-key reprs), Telebirr RSA canonicalizer, strict constant-time HMAC-SHA256 +
is_webhook_timestamp_freshreplay guard, and receipt extraction across 35 Ethiopian banks & wallets. - UI Starter Kits (
examples/): Headless React calendar hooks (examples/react-ethiopian-calendar-hook.jsx), Flutter 13-month calendar widget (examples/flutter_ethiopian_calendar.dart), React/Flutter checkout forms, and Laravel webhook controller.
Running Tests Locally
# Auto-generate js/src/index.cjs from js/src/index.mjs & verify monorepo sync python3 scripts/build_cjs.py python3 scripts/check_sync.py # Python PYTHONPATH=python python3 -m unittest discover -s python/tests -v # JavaScript / TypeScript (ESM + CJS + 146,462-day Unicode ICU check) cd js && npm test # Dart / Flutter (100% public_member_api_docs + golden vectors) cd dart && dart pub get && dart analyze --fatal-infos && dart test # PHP 8.1+ php php/tests/GoldenVectorsTest.php
Documentation & Interactive Playground
- API Docs & Recipes: docs.html
- Live Browser Playground: index.html