Example #1
0
long DateTime::minus(DateTime other, int numMins) {
    long numIntervals = 0;
    
    while(isLaterThan(other)) {
        numIntervals++;
        other.increment(numMins);
    }
    
    return(numIntervals); 
}
Example #2
0
long DateTime::diffTotal(DateTime other, int numMins) {
    if(isLaterThan(other))
        return minus(other, numMins);
    else
        return other.minus(*this, numMins);
}