Exemple #1
0
 /**
  * @param JalaliDate|JDateTime $jDate
  *
  * @return DateTime
  */
 public static function jalaliToDateTime(JalaliDate $jDate)
 {
     $firstDay = (new GeorgianDate(622, 3, 22))->toInteger();
     $nDays = $jDate->toInteger() + $firstDay - 1;
     $georgian = GeorgianDate::fromInteger($nDays);
     $dateTime = static::georgianToDateTime($georgian);
     if ($jDate instanceof JDateTime) {
         $dateTime->setTime($jDate->getHour(), $jDate->getMinute(), $jDate->getSecond());
     }
     return $dateTime;
 }