Re: Setting dates

2014-07-16 Thread Joel via Digitalmars-d-learn
On Monday, 14 July 2014 at 05:58:13 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: On Friday, July 11, 2014 04:01:24 Joel via Digitalmars-d-learn wrote: I've been trying to set a date for my program (a small struct): import std.datetime; auto date = cast(DateTime)Clock.currTime();

Re: Setting dates

2014-07-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, July 11, 2014 04:01:24 Joel via Digitalmars-d-learn wrote: I've been trying to set a date for my program (a small struct): import std.datetime; auto date = cast(DateTime)Clock.currTime(); setDate(date.day, date.month, date.year); Problem is that day month are not integers. And

Setting dates

2014-07-10 Thread Joel via Digitalmars-d-learn
I've been trying to set a date for my program (a small struct): import std.datetime; auto date = cast(DateTime)Clock.currTime(); setDate(date.day, date.month, date.year); Problem is that day month are not integers. And date.day.to!int doesn't work either.