working out the time and day restrictions via a rules object