[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01725] Re: strptime

From: Dave Thomas <Dave@...>
Date: 2000-03-05 05:08:08 UTC
List: ruby-talk #1725
Quinn Dunkan <quinn@envy.ugcs.caltech.edu> writes:

> My needs are very simple: parse a date/time, and then see if that
> time has passed.  After staring at the documentation and source of
> date2 for a while, I still can't figure out how to do this.  I'm
> feeling real dumb around now...

I've just been through a couple of days of staring at tis stuff so I
can document it, so I feel your pain ;-)

You could try something like:

     require "parsedate"
     include ParseDate

     Time.local(*parsedate(aStringDateTime)[0..5]) < Time.now

(of course, you may need some error checking depending on the
application, but the principle's the same)


Regards

Dave

In This Thread

Prev Next