Sean, On 10 May 2012, at 16:39, Sean P. DeNigris wrote:
Excerpt from http://forum.world.st/Parsing-HTTP-dates-td4623583.html :
In HTTP/1.1, valid dates come in 3 forms (per http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1) : Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
All 3 fail in Pharo 1.4 with #asDateAndTime.
I posted this to the Seaside list because it seems like there *must* be some code out there... This would be a nice utility for Zincâ¦
You are underestimating me again ;-) This has been in Zn since a very long time: ZnUtils>>parseHttpDate: string "self parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'." "self parseHttpDate: 'Tue, 13-Sep-2011 08:04:51 GMT'." "self parseHttpDate: 'Tue Jan 01 00:00:01 2036 GMT'." That should cover the spec, no ? Regards, Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill