From: David Douthitt Date: 2000-05-12T10:49:23-05:00 Subject: [ruby-talk:02787] Time Conversions This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_7820501D.4223477E Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Is there a simple straightforward one-liner of a way to convert a string = to a Time instance? I'd like something like this: given "Fri May 12 2000 10:48a" it woud = return a Time instance. t =3D Time.new t.set_string("Fri May 12 2000 10:48a") p t returns the time as analyzed from the string..... --=_7820501D.4223477E Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Is there a simple straightforward one-liner of a way = to=20 convert a string to a Time instance?
 
I'd like something like this: given "Fri May 12 2000 = 10:48a"=20 it woud return a Time instance.
 
t =3D Time.new
t.set_string("Fri May 12 2000 10:48a")
p t
 
returns the time as analyzed from the string.....
 
--=_7820501D.4223477E--