[your code here]

Jonathan M Davis newsgroup.d at jmdavisprog.com
Thu May 9 12:34:28 UTC 2019


On Saturday, May 4, 2019 5:17:57 AM MDT Russel Winder via Digitalmars-d 
wrote:
> On Sat, 2019-05-04 at 08:06 +0000, Bastiaan Veelo via Digitalmars-d wrote:
> > […]
> >
> > void main()
> > {
> >
> >      import std.datetime, std.stdio;
> >      auto d = Clock.currTime();
> >      writefln("%04d/%02d/%02d", d.year, d.month, d.day);
> >
> > }
>
> "%04d-%02d-%02d" for ISO8601 compliance.

If that's what you want, then just cast to Date and call toISOExtString() on
it.

- Jonathan M Davis






More information about the Digitalmars-d mailing list