<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Countdown extends CI_Controller {

    public function index() {
        $target_date = '2025-06-30 23:00:00'; // Ganti dengan tanggal target Anda
        $now = new DateTime();
        $target = new DateTime($target_date);
        $diff = $target->diff($now);

        $data['days'] = $diff->format('%a');
        $data['hours'] = $diff->format('%h');
        $data['minutes'] = $diff->format('%i');
        $data['seconds'] = $diff->format('%s');

        $this->load->view('countdown', $data);
    }
}