lib/commands/screenshot.js
function () {
    var date = new Date();
    var dateStr = this._parseDate();
    var hours = date.getHours();
    var minutes = date.getMinutes();
    var seconds = date.getSeconds();

    hours = (hours+'').length === 1 ? '0' + hours : hours;
    minutes = (minutes+'').length === 1 ? '0' + minutes : minutes;
    seconds = (seconds+'').length === 1 ? '0' + seconds : seconds;

    dateStr = dateStr + '_' + hours;
    dateStr = dateStr + '_' + minutes;
    dateStr = dateStr + '_' + seconds;

    return dateStr;
  }
function () {
    var date = new Date();
    var dateStr = this._parseDate();
    var hours = date.getHours();
    var minutes = date.getMinutes();
    var seconds = date.getSeconds();

    hours = (hours+'').length === 1 ? '0' + hours : hours;
    minutes = (minutes+'').length === 1 ? '0' + minutes : minutes;
    seconds = (seconds+'').length === 1 ? '0' + seconds : seconds;

    dateStr = dateStr + '_' + hours;
    dateStr = dateStr + '_' + minutes;
    dateStr = dateStr + '_' + seconds;

    return dateStr;
  }
function ( ) { var date = new Date ( ) ; var dateStr = this . _parseDate ( ) ; var hours = date . getHours ( ) ; var minutes = date . getMinutes ( ) ; var seconds = date . getSeconds ( ) ; hours = ( hours + '' ) . length === 1 ? '0' + hours : hours ; minutes = ( minutes + '' ) . length === 1 ? '0' + minutes : minutes ; seconds = ( seconds + '' ) . length === 1 ? '0' + seconds : seconds ; dateStr = dateStr + '_' + hours ; dateStr = dateStr + '_' + minutes ; dateStr = dateStr + '_' + seconds ; return dateStr ; }
Return the formatted datetime

@method _parseDatetime
@return {string} Datetime
@private
Return the formatted datetime