Re: time difference - beautify my code

2015-07-03 Thread dd0s via Digitalmars-d-learn
cool, thx for the detailed explanation guys!

Re: time difference - beautify my code

2015-07-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 02, 2015 19:42:57 anonymous via Digitalmars-d-learn wrote: On Thursday, 2 July 2015 at 19:03:49 UTC, dd0s wrote: i got a date t described in seconds from 1.1.1970, I.e., you have a unix timestamp. and i want to check if the current time is further than 12 hours from

Re: time difference - beautify my code

2015-07-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 02, 2015 19:03:48 dd0s via Digitalmars-d-learn wrote: i got a date t described in seconds from 1.1.1970, and i want to check if the current time is further than 12 hours from the given time t. the following code works but it's super ugly =S please give me some ideas how to

time difference - beautify my code

2015-07-02 Thread dd0s via Digitalmars-d-learn
i got a date t described in seconds from 1.1.1970, and i want to check if the current time is further than 12 hours from the given time t. the following code works but it's super ugly =S please give me some ideas how to make this code nicer :) private static bool sessionIsCurrent(long t)

Re: time difference - beautify my code

2015-07-02 Thread anonymous via Digitalmars-d-learn
On Thursday, 2 July 2015 at 19:03:49 UTC, dd0s wrote: i got a date t described in seconds from 1.1.1970, I.e., you have a unix timestamp. and i want to check if the current time is further than 12 hours from the given time t. the following code works but it's super ugly =S please give me