From: Michael Neumann Date: 2001-07-17T07:23:53+09:00 Subject: [ruby-talk:17947] Re: Time vs ParseDate Kero van Gelder wrote: > > |Why doesn't Time accept the output from ParseDate.parsedate directly? > > | > > |Like > > | Time.gm(ParseDate.parsedate("Mon Jul 16 2001 GMT")) > > > > Sorry for inconvenience. Try this: > > > > Time.gm(*ParseDate.parsedate("Mon Jul 16 2001 GMT")[0..4]) > > # => Mon Jul 16 12:00:00 UTC 2001 > > Not bad, but now I happen to have date which is given as a string by a > remote client (via http), which must be used to determine whether a > document has changed (and needs to be resent). > > Control downto seconds would be nice, I think. Try Date3 library from RAA. With class Time you get the same, but only for years after 1970 (UNIX date). -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de