Determine if a time is within the next specified period.
