Cyrus Dev schrieb:
> Hello all
> 
> is there any direct comparison function in ruby or in rails for time
> 
> I need a function which compare current time is between 2 time objects
> or not
> 
> ...
> 
> Please help me
> 
> thanks in advance
my first solution would be to put the three time objects in an Array:
   now = Time.now
   timebefore = now - 30*60*60
   timeafter = now + 30*60*60
   timearray = [now, timebefore, timeafter]
and after that using
   timearray.sort
to sort them. If now is between the two dates if should be on position 1