[ create a new paste ] login | about

Link: http://codepad.org/P3hr6ES9    [ raw code | fork ]

PHP, pasted on Jun 14:
<?php

class Test
{
    public function calculate_time_lap()
    {
        $formate = "%h:%i";
        $checkin = $this->input->post('checkin');
        
        
        $checkout = $this->input->post('checkout');
        
        // $checkin = $this->add_time($times); 
        //$checkout = $this->add_time1($times1); 
        
        $datetime1 = date_create($checkin);
        $datetime2 = date_create($checkout);
        $interval  = date_diff($datetime2, $datetime1);
        echo $interval->format($formate);
        // echo $inter1; 
        // $times = array($inter1, $inter2); 
        //$this->add_time($times); 
    }
}
?>


Output:
No errors or program output.


Create a new paste based on this one


Comments: