June 18, 2014 [phobos] [D-Programming-Language/phobos] daab99: Implement issue# 12886: function for parsing RFC82... | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/master Home: https://github.com/D-Programming-Language/phobos Commit: daab9927fa0e7c224e1b2200c2c287957580aa03 https://github.com/D-Programming-Language/phobos/commit/daab9927fa0e7c224e1b2200c2c287957580aa03 Author: jmdavis <jmdavisProg@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 std.datetime. 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 https://github.com/D-Programming-Language/phobos/commit/e63514cea498c1b97a36cec3c93058fbc18eac17 Author: Dmitry Olshansky <dmitry.olsh@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 |
Copyright © 1999-2021 by the D Language Foundation