FracSec is overly verbose and based on the recent discussions with
regards to Duration.get and Duration.split, it should be given the boot.
The only non-deprecated place which uses it in Phobos is SysTime, so
this deprecates the functions that use it, and replaces it with ones
that expect a Duration of less than one second.
This means replacing a SysTime constructor and SysTime's fracSec
property. fracSecs is introduced to replace fracSec. It uses a Duration
or takes a template argument for the units and then uses an int
(essentially then creating an overload which is a shortcut for calling
Duration.total or creating a Duration, depending on whether its the
getter or the setter).
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.