Working with localized dates is a common need in applications built for users who speak different languages. For developers building apps for Arabic audiences, converting date fields to Arabic format — complete with Arabic month names, day names, and numerals — shouldn’t be a headache.
That’s where laravel-arabic-date, a package I created, comes in: a clean, intuitive Laravel package that automatically converts dates into Arabic format — whether on model attributes or through a convenient facade.
👉 Packagist link: https://packagist.org/packages/ahmad-chebbo/laravel-arabic-date
🧾 Why You Need laravel-arabic-date
Representing dates in Arabic requires:
Showing Arabic numerals (٠١٢٣٤٥٦٧٨٩)
Displaying Arabic month and day names
Handling locale-specific formatting when your application language is set to Arabic
While Laravel’s default date formatting via Carbon supports localized formats for languages, building automatic, consistent conversion across Eloquent models and UI views can be repetitive and error-prone. This package removes that friction.
⚡ Key Features
Laravel Arabic date gives you:
✅ Automatic Arabic date conversion for model attributes
✅ Arabic numerals support (٠١٢٣٤٥٦٧٨٩)
✅ Arabic month and day names
✅ Easy-to-use trait for Eloquent models
✅ Facade for direct formatting calls
✅ Configurable settings for customizing output behavior
🚀 Installation
Installing the package is just a matter of running Composer:
composer require ahmad-chebbo/laravel-arabic-dateThanks to Laravel’s package auto-discovery the service provider is registered automatically.
Optionally publish the configuration:
php artisan vendor:publish --tag=arabic-date-config🗓️ Automatic Model Conversion
Want your Eloquent models to automatically return Arabic dates?
Just add the provided trait to your model and define which date attributes should be converted
<?php
namespace App\Models;
use AhmadChebbo\LaravelArabicDate\Traits\HasArabicDates;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasArabicDates;
protected $arabicDate = ['created_at', 'updated_at', 'published_at'];
}Once your app locale is set to Arabic (app()->setLocale('ar')), those date fields will now render in Arabic format — including day and month names in Arabic and Eastern Arabic numerals.
💡 Manual Conversion with Facade
Prefer to format dates manually? The package includes a facade you can call anywhere:
use AhmadChebbo\LaravelArabicDate\Facades\ArabicDate;
use Carbon\Carbon;
// Default conversion
$arabicDate = ArabicDate::formatDate(Carbon::now()); // ٢٠٢٦-٠٢-٠٥ ١٢:٣٤:٥٦
// Custom formatting
$custom = ArabicDate::formatDateCustom(Carbon::now()); // ٥ فبراير ٢٠٢٦
// With day name
$withDay = ArabicDate::formatDateWithDay(Carbon::now()); // الخميس ٥ فبراير ٢٠٢٦This makes it easy to reuse your formatting logic wherever you need localized dates.
// config/arabic-date.php
return [
'default_format' => 'Y-m-d H:i:s',
'custom_format' => 'd F Y',
'enable_arabic_numerals' => true,
'enable_arabic_months' => true,
'enable_arabic_days' => true,
'supported_languages' => ['ar'],
'auto_convert_on_retrieval' => true,
];You can control whether only numerals, names, or day strings should be localized — offering full flexibility for how dates appear throughout your app.
🌍 A Better Experience for Arabic Users
Whether building a blog, an admin dashboard, or an e-commerce platform for an Arabic-speaking audience, consistent and localized dates can greatly improve usability and readability.
While other packages handle translated date text or Hijri calendars, laravel-arabic-date focuses on effortless, automatic Arabic formatting of typical date fields — reducing boilerplate and repetitive formatting logic in your codebase.
🧠 Get Started Today
Start using laravel-arabic-date today to bring world-class Arabic date handling into your Laravel project. Visit the package on Packagist for installation details and code examples.