Location: PHPKode > scripts > Jalali Calendar > jalali-calendar/converter_example.php
<?php
require_once ('Converter.Class.php');
	$Converter = new Converter;
	
	//Miladi to Shamsi
		$year = date('Y');
		$month = date('m');
		$day = date('d');
		$g2j = $Converter->GregorianToJalali($year,$month,$day);
			echo $g2j[0]." ".$g2j[1]." ".$g2j[2];
		
		echo "<br />";
		
	//Shamsi to Miladi
		$j2g = $Converter->JalaliToGregorian('1300','1','1');
			echo $j2g[0]." ".$j2g[1]." ".$j2g[2];
?>
Return current item: Jalali Calendar