Quantcast

RFC 822 date parser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFC 822 date parser

David Turner-2
Hi all,

Does anyone know of a more up-to-date parser for RFC822-formatted dates than the one I can find in the `time-http` package? That package hasn't been touched in a while and its dependencies seem rather dated.

Many thanks,

David

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFC 822 date parser

Ivan Lazar Miljenovic
On 17 February 2017 at 22:34, David Turner
<[hidden email]> wrote:
> Hi all,
>
> Does anyone know of a more up-to-date parser for RFC822-formatted dates than
> the one I can find in the `time-http` package? That package hasn't been
> touched in a while and its dependencies seem rather dated.

Data.Time.Format in the time package has a specified RFC822 format
string that looks like it can be used with it's parser.

Happstack seems to have an RFC822Headers module that might have something.

timerep on Hackage also has an RFC822 module.

>
> Many thanks,
>
> David
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFC 822 date parser

David Turner-2
On 17 Feb 2017 13:00, "Ivan Lazar Miljenovic" <[hidden email]> wrote:
On 17 February 2017 at 22:34, David Turner
<[hidden email]> wrote:
> Hi all,
>
> Does anyone know of a more up-to-date parser for RFC822-formatted dates than
> the one I can find in the `time-http` package? That package hasn't been
> touched in a while and its dependencies seem rather dated.

Data.Time.Format in the time package has a specified RFC822 format
string that looks like it can be used with it's parser.

So it does. Right down at the very bottom, I never noticed it before. It's not fully compliant (the day-of-the-week is optional) but otherwise great.


Happstack seems to have an RFC822Headers module that might have something.

timerep on Hackage also has an RFC822 module.

That's the badger! No idea how I missed it, that looks like the one to use.

Thanks very much,

David

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFC 822 date parser

Brandon Allbery
On Fri, Feb 17, 2017 at 8:12 AM, David Turner <[hidden email]> wrote:
So it does. Right down at the very bottom, I never noticed it before. It's not fully compliant (the day-of-the-week is optional) but otherwise great.

In the real world, missing day of week is a *very* common violation of specs that want RFC822-format dates. Supporting that is a practical necessity.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Loading...