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.
The ones at the end which are removed from the docs are removed because
they're private, so there's no point in having an example in their
documentation.
This is mostly some cleanup which takes advantage of some stuff like
format being pure now, but it also removes the long month name and
case-insensitive months for simple time. I don't know why it was there
(probably idiocy on my part), and it violates the format for simple time
as defined by the documentation.
It's no longer necessary and hasn't been for some time (it was to deal
with the fact that dmd ran out of memory on Windows when compiling
std.datetime's unit tests, which hasn't been a problem for a while). So,
we're removing it.
Note that the measureTime examples do not use documented unittest
blocks, because that doesn't work when the documentation is split out
into a separate version(StdDDoc) section.
This fixes some warnings as identified by the compiler,
as well as some broken cross-reference links caused by
DDoc auto-formatting of the current symbol.
These have been deprecated for a while, but there was some balking
(primarily from Andrei IIRC) at actually removing them when they were
slated for removal, so they were instead made undocumented and slated
for removal after yet another 6 months or so. So, now that that time has
passed, here's another attempt to actually remove them.
I don't think that it makes any sense for core.time.TickDuration.to to
be a property, since it's a conversion function, not an abstraction for
a variable. However, it _does_ make sense for the example to use one of
TickDuration's property functions instead (it makes the code cleaner
too). So, I've done that. And if the property debate results in
non-property functions being allowed to be called without parens (as
currently seems likely), then anyone wanting to use the to function
without the extra parens can do so then.