DateTime custom string format

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 3 10:12:52 PDT 2014


On Tue, 03 Jun 2014 17:07:02 +0200
Robert Schadek via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:

> Is there a function in phobos that lets me do something like
> DateTime.format("MM:DD:YYYY ....") with a DateTime instance?

Not currently. It's on my todo list. I intend to get back to it after I've
finished with splitting std.datetime (which I should get to fairly soon but
have been doing some cleanup in std.datetime first), but I don't know when it
will actually be ready. So, for now, you'd have to use std.string.format and
the getters on DateTime.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list