Convert Gregorian Date to Hijri Dec 5th, 2013 ### Convert gregorian date to Hijri ####How to use By default, we create the Hijri object with the current time ```php $hijri = new HijriDate(); ``` We can set a specific time in the constructor ```php //passing time $hijri = new HijriDate( 580060800 ); //or just $hijri = new HijriDate( strtotime('1998-05-20') ); ``` Then we can retrieve the date with ```php $hijri->get_date(); //3 Syawal 1408H ``` Should we want the specific information, we can retrieve it using ```php $hijri->get_day(); //3 $hijri->get_month(); //10 $hijri->get_year(); //1408 $hijri->get_month_name( 10 ); //syawal //or from the date given $hijri->get_month_name( $hijri->get_month() ); //syawal ``` ####License > Released under the MIT license ####Credits to > This code was the improved version created by me, and originally written by [amichauer at gmx dot de ΒΆ](http://www.php.net/manual/en/ref.calendar.php#54234) guy at [PHP.NET](http://www.php.net)