There is this CL public domain utility that pre-dates ANSI:

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/ 
parsing/time/prs-time.tgz

I've modified all three lines that required updating to ANSI  
conformance,
created an .asd description file, and packaged the whole lot as:

http://lisp.jfb-city.co.uk/rescued/parse-time.tgz

What it does is this:

CL-USER 1 > (asdf :parse-time)
nil

CL-USER 2 > (utils.date:parse-time "May 4, 05")
3324153600

CL-USER 3 > (decode-universal-time *)
0
0
1
4
5
2005
2
t
0

CL-USER 4 > (utils.date:parse-time "30-Jun-06")
3360614400

CL-USER 5 > (decode-universal-time *)
0
0
1
30
6
2006
4
t
0

CL-USER 6 > (utils.date:parse-time "Feb 18 41")
4453747200

CL-USER 7 > (decode-universal-time *)
0
0
0
18
2
2041
0
nil
0

CL-USER 8 > (utils.date:parse-time "Oct 7 78")
2485555200

CL-USER 9 > (decode-universal-time *)
0
0
1
7
10
1978
5
t
0

It looks like this should probably belong to the "let's fix asdf  
packages"
project, but I'm not so sure how.

Ideas?
--
JFB
_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners

Reply via email to