const getDate = ( secs ) => { let date = new Date ( 1970 , 0 , 1 ) ; date . setSeconds ( secs ) ; return date ; } ; export const relativeDate = ( date , secs ) => { const INT_MAX = ( Math . pow ( 2 , 31 ) - 1 ) ; if ( secs === INT_MAX ) return date ; let currDate = new Date ( date ) ; currDate . setSeconds ( secs ) ; return currDate ; } ; export default getDate ;