Re: Compare times: file modification time
On Wednesday, 2 August 2017 at 13:32:46 UTC, Adam D. Ruppe wrote: On Wednesday, 2 August 2017 at 13:25:25 UTC, Martin Tschierschke wrote: I get a SysTime, how to check if it is older than an interval (1 day)? D/Phobos idiomatically? if(Clock.currTime - timeLastModified("aa.d") > 1.days) { // older } Thank you Adam. So simple!
Re: Compare times: file modification time
On Wednesday, 2 August 2017 at 13:25:25 UTC, Martin Tschierschke wrote: I get a SysTime, how to check if it is older than an interval (1 day)? D/Phobos idiomatically? if(Clock.currTime - timeLastModified("aa.d") > 1.days) { // older }
Compare times: file modification time
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.