logo       

Format dates prior to index: msg#00060

lang.ruby.ferret.general

Subject: 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

--
Posted via http://www.ruby-forum.com/.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise