Get date at compile time

Andrew via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 1 07:48:19 PDT 2016


On Saturday, 1 October 2016 at 14:43:31 UTC, Adam D. Ruppe wrote:
> On Saturday, 1 October 2016 at 14:41:22 UTC, Andrew wrote:
>> Is there any way to get the system date at compile time.
>
> Not exactly, but the special symbol __TIMESTAMP__ gets a string 
> out of the compiler at build time.
>
> http://dlang.org/spec/lex.html#specialtokens

perfect, works a treat.

Thanks both

Andrew


More information about the Digitalmars-d-learn mailing list