indonesian_date($date_time, $format); } public function format_date_dfy($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return $this->indonesian_date($date_time, 'j F Y'); } else { return '-'; } } public function format_date_ldfy($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return $this->indonesian_date($date_time, 'l, j F Y'); } else { return '-'; } } public function format_date_dmy($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return date('d-m-Y', $date_time); } else { return '-'; } } public function format_date_dmyh($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return date('d-m-Y H:i', $date_time); } else { return '-'; } } public function format_date_dmytime($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return date('d-m-Y H:i:s', $date_time); } else { return '-'; } } public function format_date_sql($string) { $date_time = strtotime($string); return date('Y-m-d', $date_time); } public function format_datetime($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return date('j F Y H:i', $date_time); } else { return '-'; } } public function format_datereport($string) { if ($string != null || $string != '') { $date_time = strtotime($string); return date('F Y', $date_time); } else { return '-'; } } public function format_date_d($string) { $date_time = strtotime($string); return date('d', $date_time); } public function format_date_age($string) { $date_time = strtotime($string); return date('d/m/Y', $date_time); } public function format_date_dash($string) { $date_time = strtotime($string); return date('j F Y H:i', $date_time); } public function format_date_dash2($string) { $date_time = strtotime($string); return date('j F', $date_time); } }