lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ogren, Philip V." <Ogren.Phi...@mayo.edu>
Subject RE: DateField - dates before 1970
Date Fri, 07 Dec 2001 18:44:57 GMT

I posted this about 3 weeks ago on the users list and didn't hear a 'peep'.
I was wondering if this has been addressed before or if its just very low
priority.

Thanks,
Philip


-----Original Message-----
From: Ogren, Philip V. 
Sent: Wednesday, November 14, 2001 8:06 AM
To: 'Lucene Users List'
Subject: DateField - dates before 1970



The method DateField.dateToString(Date date) throws an exception if the long
value of Date.getTime() is negative.  Therefore, it is not possible to
'encode' dates that are prior to 1970.  I think a limitation like this
should be clearly documented.  Please let me know if I have missed something
here.  

A possible work-around would be to add 200 years (or what ever is
*necessary*) worth of milliseconds to the value that is passed into
DateField.timeToString() and then subtract it from the return value of
DateField.stringToTime().  I'm going to try this, unless someone warns me
not to.  

I am using lucene-1.2-rc1

Thanks for your consideration,

Philip

> Philip V. Ogren
> Medical Information Resources
> Mayo Clinic Rochester
> (507) 538-0167
> ogren@mayo.edu


--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message