libs/general_function.php
//** Format Tanggal DD-MM-YYYY **//
Format Tanggal DD-MM-YYYY
Format Tanggal DD - MM - YYYY
function dateTimeEn($date){
	$date_id 		= date("Y-m-d H:i:s", $date);
	$month_array 	= date('m', strtotime($date_id));
	$dateObj   		= DateTime::createFromFormat('!m', $month_array);
	$month 			= $dateObj->format('F');
	$monthName 		= substr($month, 0 , 3);
	$date 			= date('d', strtotime($date_id));
	$newDateTime 	= date('h:i A', strtotime($date_id));
	$year 			= substr($date_id, 0 , 4);
    $date_i 		= $monthName." ".$date.", ".$year." at ".$newDateTime."";
	if($date_i == '1970-01-01'){
		return '';
	} else {
		return $date_i;
	}
}
function dateTimeEn ( $ date ) { $ date_id = date ( " Y-m-d H:i:s " , $ date ) ; $ month_array = date ( 'm' , strtotime ( $ date_id ) ) ; $ dateObj = DateTime :: createFromFormat ( '!m' , $ month_array ) ; $ month = $ dateObj -> format ( 'F' ) ; $ monthName = substr ( $ month , 0 , 3 ) ; $ date = date ( 'd' , strtotime ( $ date_id ) ) ; $ newDateTime = date ( 'h:i A' , strtotime ( $ date_id ) ) ; $ year = substr ( $ date_id , 0 , 4 ) ; $ date_i = $ monthName . " " . $ date . " ,  " . $ year . "  at  " . $ newDateTime . " " ; if ( $ date_i == '1970-01-01' ) { return '' ; } else { return $ date_i ; } }
Format Tanggal DD-MM-YYYY
Format Tanggal DD - MM - YYYY