>
> 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 used,  they are
> just appended to the string. (non of this is elegant IMO)
>
> That's all done in my Converter class. I am going to write a Calculator
> class to compare all times entered for an event and picking the closest
> times to how long the actual event took.
>
> So my question is, I know I can't use a Time object but it would be really
> nice to know if there is something out there that could help me with this as
> to write my own Calculator is going to be a bit of a pain.
>

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.


Andy

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to