Format dates prior to index

Hi all-

I would like to enable search in my application via Ferret and a number
of my searchable classes contain dates (of type Time). When these
classes are indexed, the dates are written per the standard to_s output
(e.g. “Wed Dec 07 08:56:04 CDT 2006”), which is not suitable for date
range queries. Is it possible to format the dates before they are
indexed (e.g. “20061207”) without writing additional methods that output
the dates in this format?

Thanks,
Josh

On 07.12.2006, at 22:28, Joshua Kahn wrote:

output
the dates in this format?

Is there something wrong with writing an additional method that does
the conversion? If you don’t need the extra precision of Time use
Date. Its to_s method will give you “2006-12-07” right away.


Andy

Nothing wrong, I was just hoping to avoid that. I will look into using
Date.

Thanks.