export enum LogLevel { None = 0 , Info = 1 , Trace = 2 , Custom = 3 } export function getFormattedTimeString ( date ) { const hourString = padZeroes ( 2 , String ( date . getUTCHours ( ) ) ) ; const minuteString = padZeroes ( 2 , String ( date . getUTCMinutes ( ) ) ) ; const secondString = padZeroes ( 2 , String ( date . getUTCSeconds ( ) ) ) ; return `${ hourString }:${ minuteString }:${ secondString }` ; } export function getFormattedDateString ( date ) { return date . getUTCFullYear ( ) + "-" + `${ date . getUTCMonth ( ) + 1 }` + "-" + date . getUTCDate ( ) ; } export function getFormattedDatetimeString ( date ) { return `${ getFormattedDateString ( date ) } ${ getFormattedTimeString ( date ) }` ; } function padZeroes ( minDesiredLength , numberToPad ) { if ( numberToPad . length >= minDesiredLength ) { return numberToPad ; } else { return String ( "0" . repeat ( minDesiredLength ) + numberToPad ) . slice ( - minDesiredLength ) ; } }