PHP Classes

Laravel Hijri Date Conversion: Convert dates from the Hijri to Gregorian calendar

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-09-26 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 14 This week: 1All time: 11,117 This week: 101Up
Version License PHP version Categories
hij 1.0.0The PHP License7Time and Date, PHP 7
Description 

Author

This class can convert dates from the Hijri to the Gregorian calendar.

It provides a simple class example that can take a date in the Hijri calendar and convert it to the same date in the Gregorian calendar.

The class returns the converted date as a string with the Y-m-d format.

Picture of Ahmed Abdulla
  Performance   Level  
Name: Ahmed Abdulla <contact>
Classes: 10 packages by
Country: Bahrain Bahrain
Innovation award
Innovation award
Nominee: 1x

Recommendations

Recommendation for a PHP class to convert shamsi date to gregori
How to convert hajri shamsi date to gregorian date

Example

use App\HijriShamsiConverter;

class YourController extends Controller
{
    public function convertDate()
    {
        $hijriDate = '1444/01/01'; // Replace with your Hijri Shamsi date
        $gregorianDate = HijriShamsiConverter::hijriToGregorian($hijriDate);

        // $gregorianDate will now contain the converted Gregorian date
    }
}


Details

  • Install the package using Composer

composer require kamalkhan/islamic-date

  • Create a new class to handle the conversion. You can place this class in the app directory of your Laravel application ( app/HijriShamsiConverter.php )
  • Usage in your Laravel application ( code.php )

  Files folder image Files  
File Role Description
Accessible without login Plain text file code.php Example Example usage in a Laravel controller or service
Plain text file HijriShamsiConverter.php Class Create a new class in Laravel application.
Accessible without login Plain text file readme.txt Doc. readme

 Version Control Unique User Downloads Download Rankings  
 0%
Total:14
This week:1
All time:11,117
This week:101Up