function __formatTimestamp(data)
{
    const zeroFilled = (num, length) => 
    { 
        return ('0'.repeat(length) + num).slice(-2); 
    }

    const twoZeroFilled = (num) => 
    { 
        return zeroFilled(num, 2);
    }

    // yyyy-mm-dd hh:MM:ss
    const formatCreateTime =    `${data.getFullYear()}-` + 
                                `${twoZeroFilled(data.getMonth())}-` + 
                                `${twoZeroFilled(data.getDate())} ` +
                                `${twoZeroFilled(data.getHours())}:` +
                                `${twoZeroFilled(data.getMinutes())}:` +
                                `${twoZeroFilled(data.getSeconds())}`;
    
    return formatCreateTime;
}
/**
    Return date time string from a given date object.

    Parameters:
    dateObject - Date object.
*/
Return date time string from a given date object.
Parameters:
dateObject - Date object.
Return date time string from a given date object . Parameters : dateObject - Date object .
function __formatTimestamp(data)
{
    const zeroFilled = (num, length) => 
    { 
        return ('0'.repeat(length) + num).slice(-2); 
    }
    const twoZeroFilled = (num) => 
    { 
        return zeroFilled(num, 2);
    }
    const formatCreateTime =    `${data.getFullYear()}-` + 
                                `${twoZeroFilled(data.getMonth())}-` + 
                                `${twoZeroFilled(data.getDate())} ` +
                                `${twoZeroFilled(data.getHours())}:` +
                                `${twoZeroFilled(data.getMinutes())}:` +
                                `${twoZeroFilled(data.getSeconds())}`;
    return formatCreateTime;
}
function __formatTimestamp ( data ) { const zeroFilled = ( num , length ) => { return ( '0' . repeat ( length ) + num ) . slice ( - 2 ) ; } const twoZeroFilled = ( num ) => { return zeroFilled ( num , 2 ) ; } const formatCreateTime = ` ${ data . getFullYear ( ) } ` + ` ${ twoZeroFilled ( data . getMonth ( ) ) } ` + ` ${ twoZeroFilled ( data . getDate ( ) ) } ` + ` ${ twoZeroFilled ( data . getHours ( ) ) } ` + ` ${ twoZeroFilled ( data . getMinutes ( ) ) } ` + ` ${ twoZeroFilled ( data . getSeconds ( ) ) } ` ; return formatCreateTime ; }
Return date time string from a given date object.
Return date time string from a given date object .
// yyyy-mm-dd hh:MM:ss