Thread overview
Compare times: file modification time
Aug 02, 2017
Adam D. Ruppe
August 02, 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.
August 02, 2017
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
   }

August 02, 2017
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!