Compare times: file modification time

Martin Tschierschke via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 2 06:25:25 PDT 2017


With

import std.file:timeLastModified;
auto time = timeLastModified(source);

I get a SysTime, how to check if it is older than an interval (1 
day)?
D/Phobos idiomatically?

(Currently I am using 
(Clock.currTime().toUnixTime-time.toUnixTime)< 60*60*24)).

Regards mt.


More information about the Digitalmars-d-learn mailing list