std.date / std.datetime
torhu
no at spam.invalid
Tue Jan 18 11:52:00 PST 2011
On 18.01.2011 12:34, Richard Chamberlain wrote:
> Hello,
>
> I'm in the process of learning D, and to do so I'm converting some older code.
>
> I need to print out the current local date and time, which is causing
> some difficulties because std.date doesn't seem adequate in this
> respect. I understand there is soon to be a replacement, std.datetime,
> which I suspect will be much easier.
>
> When are we likely to see a new release which includes std.datetime?
>
> If not relatively soon I presume the easiest thing to do is to download
> it myself and recompile the phobos library to include it. In which case
> there seems to be already a std.datetime with different functionality,
> is this used elsewhere in phobos? i.e. if I replace it with the new
> std.datetime is that OK?
You could always use the C functions, if you import core.stdc.time. The
ctime and strftime functions should do the trick.
http://cplusplus.com/reference/clibrary/ctime/
More information about the Digitalmars-d-learn
mailing list