param date export function formatDate ( date ) { const dateString = formatZerolessValue ( date . getFullYear ( ) ) + "-" + formatZerolessValue ( date . getMonth ( ) + 1 ) + "-" + formatZerolessValue ( date . getDate ( ) ) ; const timeString = formatZerolessValue ( date . getHours ( ) ) + ":" + formatZerolessValue ( date . getMinutes ( ) ) + ":" + formatZerolessValue ( date . getSeconds ( ) ) ; return `${ dateString } ${ timeString }` ; } /**
 * Generate a new migration timestamps
 */ export function createMigrationTimestamp ( ) { const date = new Date ( ) ; const dateString = formatZerolessValue ( date . getFullYear ( ) ) + formatZerolessValue ( date . getMonth ( ) + 1 ) + formatZerolessValue ( date . getDate ( ) ) + formatZerolessValue ( date . getHours ( ) ) + formatZerolessValue ( date . getMinutes ( ) ) + formatZerolessValue ( date . getSeconds ( ) ) ; return dateString ; } param value function formatZerolessValue ( value ) { if ( value < 10 ) { return "0" + value ; } return String ( value ) ; }