AppController::_datestime PHP Method

_datestime() public method

public _datestime ( )
    function _datestime()
    {
        if (gmdate('D', strtotime("now")) != "Fri") {
            $c = strtotime("next Friday");
            $re = gmdate('Y-m-d H:i:s', $c);
            $this->set('st', $re);
        } else {
            $re2 = gmdate('Y-m-d H:i:s', strtotime("now"));
            $this->set('st', $re2);
        }
        $timestamp = strtotime("now");
        $this->set('st1', gmdate('Y-m-d H:i:s', $timestamp));
        $timestamp = strtotime("next Monday");
        $this->set('st2', gmdate('Y-m-d H:i:s', $timestamp));
        $timestamp = strtotime("tomorrow");
        $this->set('st3', gmdate('Y-m-d H:i:s', $timestamp));
    }