Closed ShadyIbrahim closed 6 years ago
you got it wrong $date = $Gregorian->fromJD($date); here the date is already from Gregorian date
this is how to convert Gregorian
`` use Talal424\Calendars\Calendars; require 'vendor/autoload.php'; $Gregorian = Calendars::calendar('Gregorian'); $UmmAlQura = Calendars::calendar('UmmAlQura');
$newGregorianDate = $Gregorian->newDate(2018,5,21);
$gregorianDateToJd = $newGregorianDate->toJD();
// or $gregorianDateToJd = $Gregorian->toJD(2018,5,21);
$newUmmAlQuraDate = $UmmAlQura->fromJD($gregorianDateToJd);
echo $UmmAlQura->formatDate('yyyy/mm/dd E',$newUmmAlQuraDate,['localNumbers'=>false]);
Please How Can i convert from Gregorian Like 21/05/2018 and return 06/09/1439
i tried $Gregorian = Calendars::calendar('Gregorian'); $date = $Gregorian->newDate(2018,5,21); $date = $Gregorian->fromJD($date);
but get Error