From: Steve Knight
Subject: Parsing dates
Date: 
Message-ID: <6bd1744d-0289-426e-a2e9-9b233d986a5f@g17g2000prg.googlegroups.com>
Hello,

I'm looking for a CommonLisp library function that might help me to
parse a date/time string.   I couldn't really find anything suitable
via a web search but it seems like a common enough task that it must
have been solved at least once!

I was interested in something similar (but not necessarily
identical!)  to .NET's DateTime.ParseExact (which accepts culture info
and a string of permissible date format strings).

Anyone know of any such function?  Or am I going to have to get my
hands dirty?

Steve

From: Andy Chambers
Subject: Re: Parsing dates
Date: 
Message-ID: <04656f53-1a29-43cc-b7d9-63fcefc8c99e@t39g2000prh.googlegroups.com>
On Dec 12, 12:55 pm, Steve Knight <······@googlemail.com> wrote:
> Hello,
>
> Anyone know of any such function?  Or am I going to have to get my
> hands dirty?

A quick look on cliki suggests to me that you might have to get your
hands dirty but there was something that you might be able to dust off
and get going again.  The wayback machine has a reference to

http://web.archive.org/web/20040808070352/http://www.lisp-p.org/pdl/

...which claims to be a lisp date parsing lib.

--
Andy
From: ······@corporate-world.lisp.de
Subject: Re: Parsing dates
Date: 
Message-ID: <ca357529-8b6b-4585-8023-0cf68333ee6c@w24g2000prd.googlegroups.com>
On 12 Dez., 13:55, Steve Knight <······@googlemail.com> wrote:
> Hello,
>
> I'm looking for a CommonLisp library function that might help me to
> parse a date/time string.   I couldn't really find anything suitable
> via a web search but it seems like a common enough task that it must
> have been solved at least once!
>
> I was interested in something similar (but not necessarily
> identical!)  to .NET's DateTime.ParseExact (which accepts culture info
> and a string of permissible date format strings).
>
> Anyone know of any such function?  Or am I going to have to get my
> hands dirty?
>
> Steve

There are many.

See CLOCC or this:

http://www.cliki.net/net-telent-date

On a Lisp Machine just call TIME:PARSE .
From: Steve Knight
Subject: Re: Parsing dates
Date: 
Message-ID: <4236a909-3772-4d8e-8f33-440ff6f9eac1@r10g2000prf.googlegroups.com>
I had no idea about CLOCC!   Looks like there's a lot of interesting
stuff in here, thanks.

Though, I think I'll probably use Sean's cl-l10n library because it
supports cultures/locales.

Many thanks

Steve
From: Madhu
Subject: Re: Parsing dates
Date: 
Message-ID: <m31vwdbj87.fsf@moon.robolove.meer.net>
|> I'm looking for a CommonLisp library function that might help me to
|> parse a date/time string.   I couldn't really find anything suitable
|> via a web search but it seems like a common enough task that it must
|> have been solved at least once!
|>
|> I was interested in something similar (but not necessarily
|> identical!)  to .NET's DateTime.ParseExact (which accepts culture info
|> and a string of permissible date format strings).
|>
|> Anyone know of any such function?  Or am I going to have to get my
|> hands dirty?
|>
|> Steve
|
| There are many.
|
| See CLOCC or this:

CMUCL includes one, (standalone) EXT:PARSE-TIME. See

<URL:http://common-lisp.net/cgi-bin/viewcvs.cgi/src/code/parse-time.lisp?rev=1.18&root=cmucl>

[If you decide to go this route, I can give supply some patches which
 extends the list of patterns matched]

| On a Lisp Machine just call TIME:PARSE .

--
Madhu
From: sross
Subject: Re: Parsing dates
Date: 
Message-ID: <3e0d9614-c8d3-4f70-a9c9-d65fe0e7f557@k24g2000pri.googlegroups.com>
On Dec 12, 1:45 pm, Madhu <·······@meer.net> wrote:
> |> I'm looking for a CommonLisp library function that might help me to
> |> parse a date/time string.   I couldn't really find anything suitable
> |> via a web search but it seems like a common enough task that it must
> |> have been solved at least once!
> |>
> |> I was interested in something similar (but not necessarily
> |> identical!)  to .NET's DateTime.ParseExact (which accepts culture info
> |> and a string of permissible date format strings).
> |>
> |> Anyone know of any such function?  Or am I going to have to get my
> |> hands dirty?
> |>
> |> Steve
> |
> | There are many.
> |
> | See CLOCC or this:
>
> CMUCL includes one, (standalone) EXT:PARSE-TIME. See
>
> <URL:http://common-lisp.net/cgi-bin/viewcvs.cgi/src/code/parse-time.lisp?r...>
>

CL-L10N also has a port of this which adds some support for non-
english date formats.

sean
From: Steve Knight
Subject: Re: Parsing dates
Date: 
Message-ID: <5e397883-a62f-4a61-aff7-d636b7ee1100@a37g2000pre.googlegroups.com>
On Dec 12, 5:10 pm, sross <······@gmail.com> wrote:
> On Dec 12, 1:45 pm, Madhu <·······@meer.net> wrote:
>
>
>
> > |> I'm looking for a CommonLisp library function that might help me to
> > |> parse a date/time string.   I couldn't really find anything suitable
> > |> via a web search but it seems like a common enough task that it must
> > |> have been solved at least once!
> > |>
> > |> I was interested in something similar (but not necessarily
> > |> identical!)  to .NET's DateTime.ParseExact (which accepts culture info
> > |> and a string of permissible date format strings).
> > |>
> > |> Anyone know of any such function?  Or am I going to have to get my
> > |> hands dirty?
> > |>
> > |> Steve
> > |
> > | There are many.
> > |
> > | See CLOCC or this:
>
> > CMUCL includes one, (standalone) EXT:PARSE-TIME. See
>
> > <URL:http://common-lisp.net/cgi-bin/viewcvs.cgi/src/code/parse-time.lisp?r...>
>
> CL-L10N also has a port of this which adds some support for non-
> english date formats.
>
> sean

Perfect.  Thanks Sean.
From: Thomas A. Russ
Subject: Re: Parsing dates
Date: 
Message-ID: <ymizlj15lgc.fsf@blackcat.isi.edu>
Steve Knight <······@googlemail.com> writes:

> Hello,
> 
> I'm looking for a CommonLisp library function that might help me to
> parse a date/time string.
>
> Anyone know of any such function?  Or am I going to have to get my
> hands dirty?

Well, the open-source CMUCL has such a package.  It is what we have used
(with notice to the developers of CMUCL) as part of our Loom code.  It
works quite nicely, and is also reasonably extensible to additional date
formats.

EXTENSIONS:PARSE-TIME is the name of the function.  It is defined,
logically enough, in the parse-time.lisp file in the CMUCL sources.

-- 
Thomas A. Russ,  USC/Information Sciences Institute