[#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:01724] strptime

From: Quinn Dunkan <quinn@...>
Date: 2000-03-05 00:57:30 UTC
List: ruby-talk #1724
Would it be possible for the built-in Time class to include strptime?  After
all, it's just a wrapped libc function.  I gather not all libcs provide it,
but it that case it can fall back on the date2 strptime.  Except the date2
strptime returns a hash full of numbers.  After staring at it for a while, I
realized they were ruby :symbols, which you're supposed to guess or read the
source about.  I guess this is a question for the tadf, but why have strptime
return a hash, instead of a normal Time object (which is ruby's wrapper around
a struct tm)?  I appreciate the necessity of a seperate Date object to handle
stuff the simple unix model can't, but since strptime is a unix function, it
should probably return a unix date.  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...

thanks..

In This Thread

Prev Next