entensy / filament-kurdish-calendar
Kurdish calendar for Filament tables, infolists, and date pickers
Package info
github.com/Entensy/filament-kurdish-calendar
Language:JavaScript
pkg:composer/entensy/filament-kurdish-calendar
Requires
- php: ^8.2
- filament/filament: ^4.0|^5.0
- illuminate/contracts: ^11.0|^12.0
- nesbot/carbon: ^2.72|^3.0
- spatie/laravel-package-tools: ^1.14
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pint: ^1.29
- nunomaduro/collision: ^8.9
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^2.0|^3.0
- pestphp/pest-plugin-arch: ^3.1
- pestphp/pest-plugin-laravel: ^2.0|^3.0
- phpstan/phpstan: ^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Kurdish calendar formatting and picker UI for Filament.
This package does not change database storage. Values are still stored as Gregorian dates/times; the package only changes how they are displayed in Filament and how the picker UI is presented.
Requirements
| Version | |
|---|---|
| PHP | 8.2, 8.3, 8.4, 8.5 (>=8.2 <8.6 in Composer) |
| Laravel | 11.x / 12.x |
| Filament | ^4.0 | ^5.0 |
Installation
composer require entensy/filament-kurdish-calendar
php artisan vendor:publish --tag=filament-kurdish-calendar-config
Publish translations (optional)
php artisan vendor:publish --tag=filament-kurdish-calendar-translations
Publish views (optional)
php artisan vendor:publish --tag=filament-kurdish-calendar-views
Usage
Tables
use Filament\Tables\Columns\TextColumn; TextColumn::make('created_at')->kurdishDate(); TextColumn::make('updated_at')->kurdishDateTime();
Infolists
use Filament\Infolists\Components\TextEntry; TextEntry::make('created_at')->kurdishDate(); TextEntry::make('updated_at')->kurdishDateTime();
Forms (Kurdish picker UI)
use Entensy\FilamentKurdishCalendar\Forms\Components\KurdishDatePicker; KurdishDatePicker::make('birth_date');
Calendar rules
- Month names come from translations
filament-kurdish-calendar::months(publish/override as needed).
Formatting
Supported tokens
Kurdish calendar: Y y m n d j F (full month name).
Clock (same instant, app/picker timezone): H h i s g G A a.
Backslash escapes the next character.
Example:
TextColumn::make('created_at')->kurdishDate('j F Y');
Programmatic conversion
use Entensy\FilamentKurdishCalendar\Support\KurdishCalendarConverter; use Entensy\FilamentKurdishCalendar\Support\KurdishCalendarFormatter; use Illuminate\Support\Carbon; $parts = KurdishCalendarConverter::fromGregorian(Carbon::now()); $gregorian = KurdishCalendarConverter::toGregorian($parts['year'], $parts['month'], $parts['day']); $label = KurdishCalendarFormatter::format(Carbon::now(), 'Y/m/d H:i');
Configuration
Published file: config/filament-kurdish-calendar.php
return [ // null = use app.timezone 'timezone' => null, // Default display formats (Kurdish tokens + optional clock tokens) 'default_date_format' => 'Y/m/d', 'default_datetime_format' => 'Y/m/d H:i', // null = use app locale 'translation_locale' => null, // Flatpickr locale used by the picker UI 'picker_locale' => 'ckb_IQ', ];
Development
composer format
composer test
composer analyse
Compatibility
- PHP:
>=8.2 <8.6(8.2–8.5) — tested on 8.2, 8.3, 8.4, and 8.5 - Laravel: 11.x / 12.x
- Filament: ^4.0 | ^5.0
Changelog
See CHANGELOG.md.
Security
See SECURITY.md.
Local development (path repository)
If the package is a Composer path repo, code updates are immediate, but Laravel may still cache config/views:
php artisan optimize:clear
If you published config/filament-kurdish-calendar.php into the app, merge new keys from the package or delete the published file and rely on the package defaults.
License
MIT. See LICENSE.md.
