function date_to_pdf($date) { $day = get_day($date); $month = get_month($date); monthnum_to_thai($month); $year = get_year($date); $year = gen_year($year); $day = check_zero_num($day); $date = $day . " " . $month . " " . $year; return $date; }
function apprentice($id) { $ci = get_model(); $data['employee'] = $ci->db->where('id', $id)->get('employee')->result(); $check = $data['employee'][0]->firstday; $day = strtotime("+3 month"); $now = strtotime("now"); $day = $day - $now; $check = strtotime($check); $get = $check + $day; $get = date(Y . "-" . m . "-" . d, $get); $day3 = get_day($get); $month = get_month($get); $year = get_year($get); $year = gen_year($year); $day3 = check_zero_num($day3); $end['end'] = $day3 . " " . $month . " " . $year; $end['end2'] = $month . " " . $year; return $end; }