Welcome Guest, Not a member yet? Register   Sign In
Date helper > Timespan function
#1
Bug 
(This post was last modified: 03-22-2015, 03:17 AM by Muzikant.)

I think I found a bug in the date helper's timespan function. If you will try the following code, it will output only years (1), months (2), weeks (3), days (4), hours (5), minutes (6), but no seconds (7).

PHP Code:
class Test extends CI_Controller {

    public function 
index()
    {
            
$this->load->helper('date');
            echo 
timespan(0time(), 7);
    }


The bug is in the system/helpers/date_helper.php file on line 258 I think. Please check it and propose a solution. But maybe everything is alright and I am just do not understand how it should work.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB