I am using bitwise operation to store availability with 1 bit representing one minutes. So one day of availability can be represented by 1 long (8 bytes so 60 bits out of 64 bits) can be used to represent 1 hour so 24 longs will represent availability per day.
Now I have a range of times (ex. 2:00 - 4:00, 15:00 to 17:00) and I need to translate this into bit mask to compare against above longs of availabilities to see if the ranges in the mask is available or unavailable (& with mask) what is the best way to translate this range of times to bits?