/**
 * Given a date, outputs the distance in seconds to that date, clamped to 0
 */ export function distanceSecondsClamped ( dateA , dateB ) { const now = new Date ( ) ; const diff = Math . max ( 0 , ( dateB - dateA ) / 1000 ) | 0 ; return diff ; }