public function currentDatetime()
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return date('Y-m-d H:i:s');
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return time();
        }
        return null;
    }
public function currentDatetime()
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return date('Y-m-d H:i:s');
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return time();
        }
        return null;
    }
public function currentDatetime ( ) { if ( $ this -> timeFormat === static :: $ timeFormatDatetime ) { return date ( 'Y-m-d H:i:s' ) ; } if ( $ this -> timeFormat === static :: $ timeFormatTimestamp ) { return time ( ) ; } return null ; }
Get current date & time, by current time format.
@return string|int Date & time string if format is datetime, or timestamp.
Get current date & time by current time format .