DateTime custom string format

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 3 22:51:38 PDT 2014


On Tue, 03 Jun 2014 22:54:11 +0000
Brad Anderson via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:

> On Tuesday, 3 June 2014 at 18:22:59 UTC, Jonathan M Davis via
> Digitalmars-d-learn wrote:
> > Well, I would prefer to do it myself, but I obviously can't say
> > that I
> > wouldn't accept it if someone else did it and did a good job of
> > it. The main
> > problem however is that we need to come up with a good
> > formatting scheme -
> > that is the format of the custom time strings. What C has
> > doesn't cut it, and
> > what I proposed a while back turned out to be too complicated.
>
> Just for reference to Robert and others reading, here's
> Jonathan's old proposal:
>
> http://forum.dlang.org/post/mailman.1806.1324525352.24802.digitalmars-d@puremagic.com

The link to the docs in that past is no longer valid, but you can download a
tarball which includes them here:

https://drive.google.com/file/d/0B-tyih3w2oDZaUkyU0pJZl9TeEk/edit?usp=sharing

After untaring the file (which should then create the folder datetime_format),
just open datetime_format/phobos-prerelease/std_datetime.html in your browser,
and you should see the documentation for toCustomString and fromCustomString.

But as I said, the proposal was overly complicated (particularly since it
tried to accept functions for processing parts of the string). Ideally, we'd
probably have something that's somewhere in between what Stewart did and what
I was proposing - something simpler than what I proposed but more powerful
than what Stewart has. However, I'm going to have to look over both proposals
again and mull over it for a bit before I can come up with a better proposal.
I'll get back to it, but I'm putting it off until I've finished splitting
std.datetime.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list