[Seaside] Re: [Pharo-project] Parsing HTTP dates

Milan Mimica milan.mimica at gmail.com
Thu May 10 15:15:37 UTC 2012


ah, I see, you want parsing

On 10 May 2012 17:11, Milan Mimica <milan.mimica at gmail.com> wrote:

> GRPrinter httpDate print: DateAndTime now 'Thu, 10 May 2012 15:11:09 GMT'
>
>
> On 10 May 2012 17:00, Sven Van Caekenberghe <sven at beta9.be> wrote:
>
>> 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
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
>
> --
> Milan Mimica
> http://sparklet.sf.net
>



-- 
Milan Mimica
http://sparklet.sf.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120510/31f33864/attachment-0001.htm


More information about the seaside mailing list