Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-inside/convert-date.php
<?php
	function ConvertDate($string)
	{
		$year = substr($string, 0, 4);
		$month = substr($string, 5, 2);
		$day = substr($string, 8, 2);
		switch ($month)
		{
			case 01:
				$month = "jan";
				break;
			case 02:
				$month = "feb";
				break;
			case 03:
				$month = "mar";
				break;
			case 04:
				$month = "apr";
				break;
			case 05:
				$month = "may";
				break;
			case 06:
				$month = "jun";
				break;
			case 07:
				$month = "jul";
				break;
			case 08:
				$month = "aug";
				break;
			case 09:
				$month = "sep";
				break;
			case 10:
				$month = "oct";
				break;
			case 11:
				$month = "nov";
				break;
			case 12:
				$month = "dec";
				break;
			default:
				$dateerror = "date error";
		}
		if(isset($dateerror))
			return $dateerror;
		else
		{
			$stringdate = "{$day}-{$month}-{$year}";
			return $stringdate;
		}
	}
?>
Return current item: Prsaar Social Networking Platform