hidden param { Date | number } date returns { number } export function getUnixTimestamp ( date ) { let time ; if ( typeof date === 'number' ) { time = date ; } else { time = date . getTime ( ) ; } return Math . floor ( time / 1000 ) ; } hidden param { Date | number } date param { number } seconds returns { Date } export function addSeconds ( date , seconds ) { if ( typeof date === 'number' ) { return new Date ( date + seconds * 1000 ) ; } return new Date ( date . getTime ( ) + seconds * 1000 ) ; }