GeniusTS / hijri-dates

PHP library to convert Gregorian date to Hijri date and vice versa
MIT License
100 stars 37 forks source link

convertToGregorian problem #4

Closed sehsah closed 6 years ago

sehsah commented 6 years ago

hi , how can convertToGregorian by formate 1439-05-05 like convertToHijri

aboudeh87 commented 6 years ago

Use explode function before call the convertToGregorian function

sehsah commented 6 years ago

when i use this format $newdate = \GeniusTS\HijriDate\Hijri::convertToGregorian(2 - 11 - 1439);

Type error: Argument 2 passed to GeniusTS\HijriDate\Hijri::convertToGregorian() must be of the type integer, none given, called in

aboudeh87 commented 6 years ago

it should be like the following

$newdate = \GeniusTS\HijriDate\Hijri::convertToGregorian(2, 11, 1439);

sehsah commented 6 years ago

ok thank u

aboudeh87 commented 6 years ago

you are welcome

sehsah commented 6 years ago
    $date1 = 11; $date1 = 2; $date1 = 1439;
    $newdate = \GeniusTS\HijriDate\Hijri::convertToGregorian($date1 , $date2 , $date3);

also Error 👎

sehsah commented 6 years ago

ok it's worked ;)

aboudeh87 commented 6 years ago

you don't have $date2 and $date3 variables in your code :)