export function parseDateString ( str ) { return new Date ( str ) ; } export function dateToTimestampSeconds ( date ) { return Math . floor ( date . valueOf ( ) / 1000 ) ; } export function getDifferenceInSeconds ( a , b ) { return Math . floor ( ( a . valueOf ( ) - b . valueOf ( ) ) / 1000 ) ; }