export function getSecondsUntil ( end , start = new Date ( ) ) { const time = end . getTime ( ) - start . getTime ( ) ; return Math . floor ( time / 1000 ) ; } export function roundToSeconds ( ms ) { if ( ms instanceof Date ) ms = ms . getTime ( ) ; return Math . floor ( ms / 1000 ) ; }