[phobos] [D-Programming-Language/phobos] daab99: Implement issue# 12886: function for parsing RFC82...

GitHub via phobos phobos at puremagic.com
Wed Jun 18 13:08:33 PDT 2014

  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: daab9927fa0e7c224e1b2200c2c287957580aa03
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2014-06-17 (Tue, 17 Jun 2014)

  Changed paths:
    M std/datetime.d

  Log Message:
  Implement issue# 12886: function for parsing RFC822/5322 date-time format.

The RFC 822 / 5322 date-time format should be taken out and shot, but
unfortunately, it _is_ used in e-mail, HTTP, RTSP, etc. Most code which
deals with it is probably going to need to handle the rest of whatever
spec it's interacting with rather than just the date-time format, but
there are cases where this would be useful on its own (e.g. Martin
apparently needs something like this in the dmd installer), so I'm
adding a function to parse this format and return a SysTime to

However, that's all I'm adding. I find it very hard to believe that
anyone who needs to produce this particular format doesn't need a lot of
other functionality specific to whatever spec they're dealing with, and
the function for generating the date-time format presumably will be
included with that (and I definitely don't want to encourage this
format's use anyway, since it's a horrible format). So, I'm just adding
a function for parsing the format, not generating it.

parseRFC822DateTime _should_ fully and correctly implement the format as
outlined in RFC 5322 (including the obsolete syntax from RFC 822 that no
one is supposed to be generating anymore and the comment folding
whitespace nonsense that should never have been legal anywhere but at
the end). And the tests are quite thorough, so it's unlikely that I
missed anything, but you never know.

  Commit: e63514cea498c1b97a36cec3c93058fbc18eac17
  Author: Dmitry Olshansky <dmitry.olsh at gmail.com>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M std/datetime.d

  Log Message:
  Merge pull request #2253 from jmdavis/rfc822

Implement issue# 12886: function for parsing RFC822/5322 date-time format.

Compare: https://github.com/D-Programming-Language/phobos/compare/00844d30bbac...e63514cea498

More information about the phobos mailing list