[REBOL] Re: Average of times

2004-05-03 Thread Gregg Irwin
Hi Stuart, M> I have a series of times which represents session durations of users. M> They are in the format dd:hh:mm M> What I want to figure out is how long the average session takes. This is a good example of something that could be done many different ways in REBOL (like a lot of things :).

[REBOL] Re: Average of times

2004-05-03 Thread SunandaDH
Anton: > Let b be a block containing your session times. That works if the durations are hours:minutes:seconds -- you are using REBOL's standard date arithmetic. But, if I read Stuart's question right, he has days:hours:minutes. They don't add right in the same way: 1:12:00 + 1:12:00 should b

[REBOL] Re: Average of times

2004-05-03 Thread Anton Rolls
Let b be a block containing your session times. >> b: [1:00:21 2:00 3:30] == [1:00:21 2:00 3:30] >> t: 0:0 ; total == 0:00 >> foreach time b [t: t + time] == 6:30:21 >> t / length? b == 2:10:07 Anton. > I have a series of times which represents session durations of users. > > They are in th