From: "NAKAMURA, Hiroshi" Date: 2004-02-25T11:53:08+09:00 Subject: Re: date/format.rb fix Hi, > From: "Brad Hilton" > Sent: Wednesday, February 25, 2004 5:19 AM > The _parse() function of date/format.rb does not handle fractions of > seconds. Eg, the string > > 2004-02-12 12:23:45.581297-07 > > causes the parser to miss the timezone offset. You got that right. > A simple change to the regex can fix this: > - /(\d+):(\d+)(?::(\d+))? > + /(\d+):(\d+)(?::(\d+)(?:\.\d+)?)? Drop fractions? /(\d+):(\d+)(?::(\d+(?:\.\d+)?))? Could be better but I don't know how we treat $3 string. $3 is converted to Integer via to_i now. Float? Rational? The author Funaba-san merely seen in this ML. I'll forward it some later date. Regards, // NaHi