[comp.lang.perl] Wanted: date parsing lib

lmjm@doc.ic.ac.uk (Lee McLoughlin) (05/08/91)

I regularly munge date strings in various admin scripts - I also run
an archive and often have to work with remote sites "ls -l" listings.

So I'm after a some routines to parse dates.  I guess it must be a
relatively common thing to do so someone out there must have something
suitable already?  Please?

I currently pass dates out to a little program that uses getdate and
strftime to do the work.  But that is very slow.

Thanks in advance

	Lee
--
--
Lee McLoughlin		phone: 071 589 5111 X 5085  	fax: 071 581 8024
Department of Computing, Imperial College, 180 Queens Gate, London SW7 2BZ, UK
Janet: lmjm@uk.ac.ic.doc	Uucp:  lmjm@icdoc.UUCP (or ..!ukc!icdoc!lmjm)
DARPA: lmjm@doc.ic.ac.uk (or lmjm%uk.ac.ic.doc@nsfnet-relay.ac.uk)

tchrist@convex.COM (Tom Christiansen) (05/08/91)

From the keyboard of lmjm@doc.ic.ac.uk (Lee McLoughlin):
:I currently pass dates out to a little program that uses getdate and
:strftime to do the work.  But that is very slow.

If you can manage to pass getdate more than one arg at a time, preferably
as many as your system will allow, it's not so bad.

--tom
--
Tom Christiansen		tchrist@convex.com	convex!tchrist
		"So much mail, so little time." 

urlichs@smurf.sub.org (Matthias Urlichs) (05/09/91)

In comp.lang.perl, article <1991May08.053158.20695@convex.com>,
  tchrist@convex.COM (Tom Christiansen) writes:
< From the keyboard of lmjm@doc.ic.ac.uk (Lee McLoughlin):
< :I currently pass dates out to a little program that uses getdate and
< :strftime to do the work.  But that is very slow.
< 
< If you can manage to pass getdate more than one arg at a time, preferably
< as many as your system will allow, it's not so bad.
< 
Or you can hack misc/getdate.c to accept date strings on stdin, one per line,
if there are no arguments on the command line.
Opening a bidirectional pipe in Perl isn't that hard; don't forget to turn
off stdio buffering (both in your Perl script and in getdate).

-- 
Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de     /(o\
Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49-721-621127(0700-2330)   \o)/