February 21, 2013
Hi,
Can someone tell me an algorithm which determines if a file specified by its name was modified today?
I suspect that I will need a std.datetime module to work with dates, and something from somewhere that would tell me the modification date and then convert and compare.
But std.datetime is quite large... Sorry if this looks like laziness. :-)
Thank.
February 21, 2013
On Thursday, 21 February 2013 at 12:40:37 UTC, Lubos Pintes wrote:
> Hi,
> Can someone tell me an algorithm which determines if a file specified by its name was modified today?
> I suspect that I will need a std.datetime module to work with dates, and something from somewhere that would tell me the modification date and then convert and compare.
> But std.datetime is quite large... Sorry if this looks like laziness. :-)
> Thank.

http://dlang.org/phobos/std_file.html#timeLastModified

and then you should be able to very easily use the methods etc. of http://dlang.org/phobos/std_datetime.html#.SysTime to work out whether it was modified on any particular day.