std.datetime for month integer
dsmith
ds at nomail.com
Mon Jul 18 09:01:06 PDT 2011
Recall that std.date used the following to retrieve a month in integer form (0 .. 11):
auto Now = std.date.getUTCtime();
writeln(std.date.monthFromTime(Now));
Using std.datetime, the following yields the abbreviated month name:
auto Now = Clock.currTime();
writefln("%s", Now.month); // --> jul
Now, how can std.datetime be used to print the month in integer form?
More information about the Digitalmars-d-learn
mailing list