hasTimePassed (minSeconds, date1, date2) {
        // Convert both dates to seconds
        const date1Sec = date1.getTime() / 1000;
        const date2Sec = date2.getTime() / 1000;
    
        // If n seconds has passed
        if (date2Sec - date1Sec >= minSeconds) {
            return true;
        }
    
        return false;
    }
// Check if at least n seconds has passed between two date objects
Check if at least n seconds has passed between two date objects
Check if at least n seconds has passed between two date objects
hasTimePassed (minSeconds, date1, date2) {
        const date1Sec = date1.getTime() / 1000;
        const date2Sec = date2.getTime() / 1000;
        if (date2Sec - date1Sec >= minSeconds) {
            return true;
        }
        return false;
    }
hasTimePassed ( minSeconds , date1 , date2 ) { const date1Sec = date1 . getTime ( ) / 1000 ; const date2Sec = date2 . getTime ( ) / 1000 ; if ( date2Sec - date1Sec >= minSeconds ) { return true ; } return false ; }
Check if at least n seconds has passed between two date objects
Check if at least n seconds has passed between two date objects
// Convert both dates to seconds // If n seconds has passed