toGregorian() public static method

Converts a Jalali date to Gregorian.
public static toGregorian ( integer $jy, integer $jm, integer $jd ) : array
$jy integer
$jm integer
$jd integer
return array 0: Year 1: Month 2: Day
Esempio n. 1
0
 public function testToGregorian()
 {
     $this->assertTrue(jDateTime::toGregorian(1395, 2, 18) === [2016, 5, 7]);
     $this->assertFalse(jDateTime::toGregorian(1394, 2, 18) === [2015, 5, 7]);
 }
Esempio n. 2
0
 public function setExpiredAtAttribute($date)
 {
     $jalali = explode('/', $date);
     $this->attributes['expired_at'] = implode('-', jDateTime::toGregorian($jalali[0], $jalali[1], $jalali[2]));
 }