Get date at compile time

rikki cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 1 07:43:13 PDT 2016


On 02/10/2016 3:41 AM, Andrew wrote:
> Hi,
>
> Is there any way to get the system date at compile time. I want
> something like:
>
> static string compileDate = Clock.currTime.toString;
>
> but that fails.
>
> Thanks very much
>
> Andrew

https://dlang.org/spec/lex.html#specialtokens


More information about the Digitalmars-d-learn mailing list