Hi there, I am hoping that you will be able to help me a problem I am having. I am quite new to Ruby (and for that matter programming) and this is my first useful program. What I need to do is find out if a time range crosses one or more fixed time boundaries. I have defined that start and end time of the range: timeStart = Time.local(a,b,c,d,e,f) timeEnd = Time.local(u,v,w,x,y,z) The range lasts anything between 1 and many thousands of seconds. I need to know which (if any) of the following boundaries the range crosses: Midnight between Friday and Saturday Midnight between Sunday and Monday 08:00 Monday to Friday 18:00 Monday to Friday But I do not know how to define these as times that can be compared to timeStart and timeEnd as a time is simply one point in time, whereas 18:00 on a weekday evening occurs many times. I can work out in which period the range starts and ends easily enough using time.wday and time.hour. This can tell me with certainty that the range crosses a boundary if the start period is different from the end period, but not specifically which boundary (or boundaries). Also, just because it starts and ends in the same period doesn't mean it hasn't crossed a boundary (it may for example run from one weekend through to the next). Any help would be appreciated. Thanks. -- Tim Pettman tjp / vbc.net