digitalmars.D.learn - Compare times: file modification time
- Martin Tschierschke (9/9) Aug 02 2017 With
- Adam D. Ruppe (5/8) Aug 02 2017 if(Clock.currTime - timeLastModified("aa.d") > 1.days) {
- Martin Tschierschke (2/10) Aug 02 2017 Thank you Adam. So simple!
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.
Aug 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 }
Aug 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:Thank you Adam. So simple!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 }
Aug 02 2017