rawand201/filament-kurdish-calendar
最新稳定版本:v1.0.0
Composer 安装命令:
composer require rawand201/filament-kurdish-calendar
包简介
Kurdish calendar for Filament tables, infolists, and date pickers
README 文档
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.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-31
