Logo Lanfrica

Bereketmuniye/date-picker-for-ethiopian

Domaine:

natural language processing

Type de record:

softwaretools
Créateur:
Ber
HĂ´te:
# 🇪🇹 Ethiopian Date & Time Picker A professional Ethiopian calendar date and time picker with accurate Gregorian ↔ Ethiopian conversion. Pure JavaScript, zero dependencies. ## Features ✅ **Tiered Navigation** (Year → Month → Day) • ✅ **Age Calculation** • ✅ Accurate conversion • 🌍 Bilingual (Amharic/English) • 🌅 Native Ethiopian Time (6h offset) • 🌙 Dark mode • 🎉 Holiday highlighting • ⌨️ Keyboard navigation • ♿ Accessible • 📱 Responsive ## Installation **JavaScript (NPM)**: ```bash npm install @bekim_2121/ethiopian-datepicker ``` **PHP (Composer)**: ```bash composer require bekim2121/ethiopian-datepicker ``` **JavaScript (CDN)**: ```html ``` ## Quick Start ### JavaScript Usage ```html // Initialize Date Picker new EthiopianDatePicker('#datepicker', { locale: 'am', // 'am' or 'en' darkMode: false }); ``` ### PHP Usage ```php { console.log('Ethiopian:', date.ethiopian); console.log('Gregorian:', date.gregorian); console.log('Formatted:', date.formatted); } }); ``` ### PHP Configuration The PHP library doesn't require configuration - it's ready to use after installation: ```php console.log(time.ethiopian.formatted) }); ``` ## API ### JavaScript API | Method | Description | | --- | --- | | `getSelectedDate()` | Returns the currently selected date object. | | `setDate(y, m, d)` | Sets the date programmatically. | | `open()` / `close()` | Manually control picker visibility. | ### PHP API | Method | Description | | --- | --- | | `gregorianToEthiopian($year, $month, $day)` | Convert Gregorian to Ethiopian date | | `ethiopianToGregorian($year, $month, $day)` | Convert Ethiopian to Gregorian date | | `today()` | Get current Ethiopian date | | `formatDate($date, $language, $format)` | Format Ethiopian date for display | | `isLeapYear($year)` | Check if Ethiopian year is leap year | | `getAmharicMonths()` | Get month names in Amharic | | `getEnglishMonths()` | Get month names in English | ## Ethiopian Calendar Utilities ```javascript const …

Languages

Licenses