Location: PHPKode > scripts > Very Simple Events List > very-simple-events-list/library/timeFunctions.php
<?php
function realHour($time)
{
  $hour = substr($time, 0, 2);
		
		if ($hour > 12) 
		{
		$hour = $hour - 12;
		$ampm = 'PM';
		} 
		elseif ($hour == 12) 
		{
		$ampm = 'PM';
		} 
		elseif ($hour == 0) 
		{
		$hour = 12;
		$ampm = 'AM';
		}
		else 
		{
		$hour = $hour - 0;
		$ampm = 'AM';
		}
	
	return $hour;	
}

function realAMPM($time)
{
  $hour = substr($time, 0, 2);
		
		if ($hour > 12) 
		{
		$hour = $hour - 12;
		$ampm = 'PM';
		} 
		elseif ($hour == 12) 
		{
		$ampm = 'PM';
		} 
		elseif ($hour == 0) 
		{
		$hour = 12;
		$ampm = 'AM';
		}
		else 
		{
		$ampm = 'AM';
		}
	
	return $ampm;	
}  


?>
Return current item: Very Simple Events List