Get date at compile time

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 1 07:43:31 PDT 2016


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


More information about the Digitalmars-d-learn mailing list