Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 18:07, Michael Pavling wrote: > On 16 June 2010 16:45, Ants Pants wrote: > > As I have said before, I have no problems with all of that but thanks for > > the suggestions. > > To be honest, I don't really understand what you're asking for help > with. If you can state your positi

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Michael Pavling
On 16 June 2010 16:45, Ants Pants wrote: > As I have said before, I have no problems with all of that but thanks for > the suggestions. To be honest, I don't really understand what you're asking for help with. If you can state your position in different terms, because what you've said so far obvi

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 16:57, Michael Pavling wrote: > On 16 June 2010 15:51, Ants Pants wrote: > > I don't have a problem with comparing floats, but I might need to find > the > > 10 closest times to the actual event time and 4 of those times could be > less > > than the actual event time and 6 could

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Michael Pavling
On 16 June 2010 15:51, Ants Pants wrote: > I don't have a problem with comparing floats, but I might need to find the > 10 closest times to the actual event time and 4 of those times could be less > than the actual event time and 6 could be higher. As a starting point, IIWM I would: * Get the t

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Andy Jeffries
> > If you have two floating point values representing seconds (and parts of) >> why can't you just compare the two floating point values? >> >> What part are you stuck with? Can you give us some code with a comment on >> which bit you can't do. >> > >> I don't have a problem with comparing floats

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 15:54, Andy Jeffries wrote: > These values are then converted to seconds and stored as decimal in the DB >> (I allow fractions of a second, too (tenth, hundredth, millisecond). when >> they are retrieved form the DB, I convert the seconds to a string format of, >> for example, 01:

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Andy Jeffries
> > These values are then converted to seconds and stored as decimal in the DB > (I allow fractions of a second, too (tenth, hundredth, millisecond). when > they are retrieved form the DB, I convert the seconds to a string format of, > for example, 01:39:11 (from 5951 seconds). If fractions are use

[Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
I know this is a Ruby question but I'm not on any Ruby mailing lists and it's for a Rails project (so might come under select_time etc. ;) ) I thought I'd try here. A user can choose integer values from select drop down boxes to predict how long an event will take. Obvious values are secs (0-59),