Re: Four patches for LWP (and comments)

Nick.Ing-Simmons@tiuk.ti.com
Tue, 8 Aug 95 16:26:04 BST


In <199508081050.MAA00785@bergen.oslonett.no>
On Tue, 08 Aug 1995 12:50:22 +0200
Gisle Aas <aas@oslonett.no> writes:
>> I have used Tom's getdate and it did what I wanted. Unfortunately I
>> don't know what _we_ want.
>
>Does it parse these formats:
>
> "Wed, 09 Feb 1994 22:23:32 GMT"       -- proposed HTTP format
> "Thu Feb  3 17:03:55 GMT 1994"        -- ctime format
> "Tuesday, 08-Feb-94 14:15:29 GMT"     -- old rfc850 HTTP format
> "Tuesday, 08-Feb-1994 14:15:29 GMT"   -- broken rfc850 HTTP format
>
> "03/Feb/1994:17:03:55 -0700"   -- common logfile format
> "09 Feb 1994 22:23:32 GMT"     -- HTTP format (no weekday)
> "08-Feb-94 14:15:29 GMT"       -- rfc850 format (no weekday)
> "08-Feb-1994 14:15:29 GMT"     -- broken rfc850 format (no weekday)
>
> "08-Feb-94"     -- old rfc850 HTTP format    (no weekday, no time)
> "08-Feb-1994"   -- broken rfc850 HTTP format (no weekday, no time)
> "09 Feb 1994"   -- proposed new HTTP format  (no weekday, no time)
> "03/Feb/1994"   -- common logfile format     (no time, no offset)

I have modified grammar of Graham Barr's byacc/perl version so that it says: 

Your test string                                    Time decoded as

Wed, 09 Feb 1994 22:23:32 GMT                   Wed Feb  9 22:23:32 GMT 1994
Thu Feb  3 17:03:55 GMT 1994                    Thu Feb  3 17:03:55 GMT 1994
Tuesday, 08-Feb-94 14:15:29 GMT                 Tue Feb  8 14:15:29 GMT 1994
Tuesday, 08-Feb-1994 14:15:29 GMT               Tue Feb  8 14:15:29 GMT 1994
03/Feb/1994:17:03:55 -0700                      Fri Feb  4  0:03:55 GMT 1994
09 Feb 1994 22:23:32 GMT                        Wed Feb  9 22:23:32 GMT 1994
08-Feb-94 14:15:29 GMT                          Tue Feb  8 14:15:29 GMT 1994
08-Feb-1994 14:15:29 GMT                        Tue Feb  8 14:15:29 GMT 1994
08-Feb-94                                       Tue Feb  8 16:23:34 GMT 1994
08-Feb-1994                                     Tue Feb  8 16:23:34 GMT 1994
09 Feb 1994                                     Wed Feb  9 16:23:34 GMT 1994
03/Feb/1994                                     Thu Feb  3 16:23:34 GMT 1994

I can